I have been doing this:
public List<Role> GetRoles()
{
List<Role> result = new List<Role>();
foreach (var r in Db.tblRoles)
{
result.Add(new Role()
{
Description = r.d,
Id = r.Id,
Responsibility = r.Responsibility
});
}
return result;
}
I have a lot of table that map 1:1 with my object model, is there a better way to get my table data into my om?