public async Task <TO> FindSelectAsync <TO>(TO entity) where TO : EntidadeBase { { var sql = RepositoryUtil.GetKeyFilterSql(entity, out bool nonKeys); if (nonKeys == false) { var valueFound = await FindSingleOrDefaultSqlAsync <TO>(sql); if (valueFound != null) { return(valueFound); } } } { var sql = RepositoryUtil.GetDnUniqueKeyFilterSql(entity, out bool nonKeys); if (nonKeys == false) { var valueFound = await FindSingleOrDefaultSqlAsync <TO>(sql); if (valueFound != null) { return(valueFound); } } } return(null); }
public virtual async Task <int> QuantidadeAsync(TE entity, bool includeExcludedLogically = false) { var sql = RepositoryUtil.GetKeyAndDnUniqueKeyFilterSql(entity); return(await CountSqlAsync(sql, includeExcludedLogically)); }
internal async Task <List <object> > ExistOnListAsync(PropertyInfo property, Type dbEntityType, object[] elements) { var outType = property.PropertyType; var sql = RepositoryUtil.ListToInSql(dbEntityType, elements, property);