public ActionResult CreateModule(ModuleModel model)
 {
     if (ModelState.IsValid)
     {
         var module = model.ToEntity();
         _moduleRepository.InsertAndCommit(module);
         SuccessNotification(_localizationService.GetResource("Record.Saved"));
         return(new NullJsonResult());
     }
     else
     {
         return(Json(new { Errors = ModelState.SerializeErrors() }));
     }
 }