I'm wondering if there is a better way to do the following,
IList<RoleViewModel> ReturnViewModel = new List<RoleViewModel>();
IList<Role> AllRoles = PermServ.GetAllRoles();
foreach (var CurRole in AllRoles)
{
ReturnViewModel.Add(new RoleViewModel(CurRole));
}
Its pretty simple code simply taking the Data Object and converting it into a ViewModel. I was wondering if there was a way to do this better? - Maybe with Linq?