protected bool ValidateEntity <T>(T entity) where T : Entity { if (_notifications.HasNotification()) { return(false); } var validationResult = entity.Validate(); if (validationResult.IsValid) { return(true); } _notifications.HandleNotification(validationResult); return(false); }
protected void AddNotification(string message) { _notifications.HandleNotification("ApiValidation", message); }