internal static void SaveCategory(PetaPocoUnitOfWork unitOfWork, SecureSettingsCategory model) { if (!string.IsNullOrEmpty(model.Name)) { try { unitOfWork.Database.Save(model); } catch (Exception ex) { LogHelper.Error<SecureSettingsCategory>(ex.Message, ex); } } }
public object SaveCategory(SecureSettingsCategory model) { SecureSettingsService.Instance.SaveCategory(model); return "Saved..."; }
public object AddCategory(SecureSettingsCategory model) { SecureSettingsService.Instance.AddCategory(model.Name); return "Added..."; }
public object RemoveCategory(SecureSettingsCategory model) { SecureSettingsService.Instance.RemoveCategory(model.Id); return true; }