refactoring backend structure
This commit is contained in:
parent
dcc59f7b69
commit
0e1c16ab91
36 changed files with 786 additions and 454 deletions
|
@ -1,24 +1,24 @@
|
|||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Sledgemapper.Entities;
|
||||
// using Microsoft.EntityFrameworkCore;
|
||||
// using Microsoft.Extensions.Configuration;
|
||||
// using Sledgemapper.Entities;
|
||||
|
||||
namespace Sledgemapper.Helpers
|
||||
{
|
||||
public class DataContext : DbContext
|
||||
{
|
||||
protected readonly IConfiguration Configuration;
|
||||
// namespace Sledgemapper.Helpers
|
||||
// {
|
||||
// public class DataContext : DbContext
|
||||
// {
|
||||
// protected readonly IConfiguration Configuration;
|
||||
|
||||
public DataContext(IConfiguration configuration)
|
||||
{
|
||||
Configuration = configuration;
|
||||
}
|
||||
// public DataContext(IConfiguration configuration)
|
||||
// {
|
||||
// Configuration = configuration;
|
||||
// }
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder options)
|
||||
{
|
||||
// connect to sql server database
|
||||
options.UseSqlServer(Configuration.GetConnectionString("WebApiDatabase"));
|
||||
}
|
||||
// protected override void OnConfiguring(DbContextOptionsBuilder options)
|
||||
// {
|
||||
// // connect to sql server database
|
||||
// options.UseSqlServer(Configuration.GetConnectionString("WebApiDatabase"));
|
||||
// }
|
||||
|
||||
public DbSet<User> Users { get; set; }
|
||||
}
|
||||
}
|
||||
// public DbSet<User> Users { get; set; }
|
||||
// }
|
||||
// }
|
Loading…
Add table
Add a link
Reference in a new issue