Exemplo n.º 1
0
 public void Create(Group group)
 {
     if (group != null)
     {
         _repository.Insert(group);
     }
 }
Exemplo n.º 2
0
 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);
 }