Exemple #1
0
 public void EditRegion(RegionModel model)
 {
     if (ModelState.IsValid) {
         var region = RegionModel.ToDomainModel(model);
         if (region.Id > 0) {
             masterService.UpdateRegion(region);
         } else {
             masterService.AddRegions(new[] { region });
         }
     }
     //return RedirectToAction("Regions");
 }
Exemple #2
0
 public static Region ToDomainModel(RegionModel model)
 {
     return new Region {
         Id = model.Id,
         Name = model.Name,
         Description = model.Description
     };
 }