public class vUserRole { public int UserId { get; set; } public string LoginId { get; set; } public string UserName { get; set; } public int RoleId { get; set; } public string RoleName { get; set; } }
public DbSet<vUserRole> vUserRoles { get; set; }
{"One or more validation errors were detected during model generation:\r\n\r\n\\tSystem.Data.Entity.Edm.EdmEntityType: : EntityType 'vUserRole' has no key defined. Define the key for this EntityType.\r\n\\tSystem.Data.Entity.Edm.EdmEntitySet: EntityType: EntitySet 'vUserRoles' is based on type 'vUserRole' that has no keys defined.\r\n"}
[Key] public int UserId { get; set; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)