private static Func <AlertType, bool> MakeAlertType(AlertTypeViewModel model) { return(alertType => { if (model == null) { return false; } alertType.IsSendingEmail = model.IsSendingEmail; alertType.Message = model.Message; return true; }); }
public async Task SaveAlert(AlertTypeViewModel model) { await _alertTypeManager.Update(model.Id, MakeAlertType(model), model.NotifyDays); }