public class User
{
public int ID { get; set; }
public string Name { get; set; }
}
public class ViewUser
{
public int ID { get; set; }
public string Name { get; set; }
}
public class ModelContext : DbContext
{
public ModelContext() : base("name=con") { }
public DbSet<User> Users{ get; set; }
public DbSet<ViewUser> ViewUsers{ get; set; }
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
}
}
Tag : .NET, Ms SQL Server 2016, Entity Framework (EF), C#, Windows