Beispiel #1
0
 public void Create(Group group)
 {
     if (group != null)
     {
         _repository.Insert(group);
     }
 }
 public ActionResult GroupCreate(GroupViewModel model)
 {
     if (ModelState.IsValid)
     {
         var mo = new Group()
         {
             Name = model.Name,
             ZoneId = model.ZoneId
         };
         _stagedGroupService.Delete(model.Id);
         _groupService.Create(mo);
         this.AccessContext.FlushChanges();
         mo.UniqueId = "G" + mo.Id;
         return Json(new { });
     }
     ModelState.AddModelError("", "There are validation Errors");
     return PartialView(model);
 }