private void ErrosHandle <TEntity>(DataResultsDto <TEntity> results) { foreach (var error in _notifications.GetValues()) { results.Add(error.Value); } }
public DataResultsDto <TEntity> ResponseResult <TEntity>(TEntity entity) { var results = new DataResultsDto <TEntity>() { Entity = entity }; if (!_notifications.HasNotifications()) { return(results); } ErrosHandle(results); return(results); }
public DataResultsDto <TEntity> ResponseResult <TEntity>(IEnumerable <TEntity> data) { var results = new DataResultsDto <TEntity>() { Data = data }; results.Count = data != null?data.Count() : 0; if (!_notifications.HasNotifications()) { return(results); } ErrosHandle(results); return(results); }