public static NeedsVueData FromViewModel(NeedsViewModel s) { return(new NeedsVueData { OrgType = s.OrgType.ToString(), PpeTypes = s.PpeTypes.SelectToList(PpeTypeInfo.Project), }); }
public static EditNeedsViewModel FromEntities(Need s, List <Supplier> suppliers) { return(new EditNeedsViewModel { Request = NeedsViewModel.FromEntity(s), Status = PostStatusViewModel.FromEntity(s), Twitter = TwitterViewModel.FromEntity(s), NeedsMatching = NeedsMatchViewModel.FromEntities(s, suppliers), Location = LocationViewModel.FromEntity(s), Notes = NotesViewModel.FromNeed(s), }); }