trying to merge identity in api
This commit is contained in:
parent
9d4fd1e6c0
commit
5f6095f3ef
39 changed files with 868 additions and 282 deletions
24
Sledgemapper.Api/Helpers/DataContext.cs
Normal file
24
Sledgemapper.Api/Helpers/DataContext.cs
Normal file
|
@ -0,0 +1,24 @@
|
|||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Sledgemapper.Entities;
|
||||
|
||||
namespace Sledgemapper.Helpers
|
||||
{
|
||||
public class DataContext : DbContext
|
||||
{
|
||||
protected readonly IConfiguration Configuration;
|
||||
|
||||
public DataContext(IConfiguration configuration)
|
||||
{
|
||||
Configuration = configuration;
|
||||
}
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder options)
|
||||
{
|
||||
// connect to sql server database
|
||||
options.UseSqlServer(Configuration.GetConnectionString("WebApiDatabase"));
|
||||
}
|
||||
|
||||
public DbSet<User> Users { get; set; }
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue