Esempio n. 1
0
 public void Create(Church entity)
 {
     if (entity != null)
     {
         _repository.Insert(entity);
     }
 }
Esempio n. 2
0
 public ActionResult ChapterCreate(ChurchViewModel model)
 {
     if (ModelState.IsValid)
     {
         var mo = new Church
         {
             Name = model.Name,
             GroupId = model.GroupId,
             DefaultCurrencyId = model.DefaultCurrencyId,
         };
         _stagedChurchService.Delete(model.Id);
         _churchService.Create(mo);
         this.AccessContext.FlushChanges();
         mo.UniqueId = "C" + mo.Id;
         return Json(new { });
     }
     ModelState.AddModelError("", "There are validation Errors");
     return PartialView(model);
 }