Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

fluent api c# hasmany withmany

public class User
{
    public User()
    {
        Roles = new List<Role>();
    }

    public int UserId { get; set; }
    public string UserName { get; set; }
    public ICollection<Role> Roles { get; set; }
}

public class Role
{
    public int RoleId { get; set; }
    public string RoleName { get; set; }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #fluent #api #hasmany #withmany
ADD COMMENT
Topic
Name
2+9 =