EF Models created
This commit is contained in:
@@ -1,23 +1,38 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Models.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Models
|
||||
{
|
||||
public class LuminousContext : DbContext
|
||||
public class LuminousContext : DbContext
|
||||
{
|
||||
public LuminousContext()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public LuminousContext(DbContextOptions options) : base(options)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public DbSet<User> User { get; set; }
|
||||
public DbSet<Role> Role { get; set; }
|
||||
public DbSet<Permission> Permission { get; set; }
|
||||
public DbSet<Product> Product { get; set; }
|
||||
public DbSet<Deal> Deal{ get; set; }
|
||||
public DbSet<Deal> Deal { get; set; }
|
||||
public DbSet<Stock> Stock { get; set; }
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
optionsBuilder.UseSqlServer(
|
||||
@"Server=(localdb)\mssqllocaldb;Database=LuminousSales;Integrated Security=True");
|
||||
optionsBuilder
|
||||
.UseLazyLoadingProxies()
|
||||
.UseSqlServer(Configuration.ConnectionString);
|
||||
}
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
base.OnModelCreating(modelBuilder);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user