public void Create(Zone zone) { _repository.Insert(zone); }
public void Delete(Zone t) { _repository.Delete(t); }
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); }