0
Well I am using the EF with the following code to query it brings the query by name and type but by date not, since the time is not in my filter with the time 00:00:00 it brings correctly the time is not part of the search, but is part of the business rule.
public PaginationResult<Tabela> GetAll(ISpecification<Tabela> specification, Pagination pagination = null, Sorting sorting = null)
{
var query = Tabela.Where(specification.SatisfiedBy());
var result = new PaginationResult<Schedule>();
if (sorting != null)
{
query = query.OrderBy(sorting.ToString());
}
result.TotalItems = query.Count();
if (pagination != null)
{
query = query.Skip(pagination.CurrentPage * pagination.ItemsPerPage).Take(pagination.ItemsPerPage);
}
result.Items = query.ToList();
return result;
}
The specification
specification =
specification.And(Specification<tabela>.Create(e => e.data.Equals(filter.data)));
Is there any way you can edit the specification of your problem? I couldn’t understand anything.
– Jéf Bueno
Well I want to ignore the hour in the consultation
– Bruno H.
What kind of Data ? field edit your question and post a class of your model with the example of your method call.
– Marco Souza
Good I’m redoing can leave
– Bruno H.