Example #1
0
 public void Create(Zone zone)
 {
     _repository.Insert(zone);
 }
Example #2
0
 public void Delete(Zone t)
 {
     _repository.Delete(t);
 }
Example #3
0
 public ActionResult ZoneCreate(ZoneViewModel model)
 {
     if (ModelState.IsValid)
     {
         var mo = new Zone()
             {
                 Name = model.Name,
             };
         _stagedZoneService.Delete(model.Id);
         _zoneService.Create(mo);
         this.AccessContext.FlushChanges();
         mo.UniqueId = "Z" + mo.Id;
         return Json(new {});
     }
     ModelState.AddModelError("", "There are validation Errors");
     return PartialView(model);
 }