public static EditSuppliesViewModel FromEntities(Supplier s)
 {
     return(new EditSuppliesViewModel
     {
         Supplies = SuppliesViewModel.FromEntity(s),
         Status = PostStatusViewModel.FromEntity(s),
         Location = LocationViewModel.FromEntity(s),
         Notes = NotesViewModel.FromSupplier(s),
     });
 }
예제 #2
0
 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),
     });
 }