Skip to content

Any Operations

Furkan Güngör edited this page Jun 20, 2022 · 2 revisions

Summary

Any queries can be run with EasyRepository.

public class MyClass
{
    private readonly IUnitOfWork _unitOfWork;
    public MyClass(IUnitOfWork unitOfWork)
    {
        _unitOfWork = unitOfWork;
    }

    public async Task<bool> AnyAsync()
    {
         return await _unitOfWork.Repository.AnyAsync<Author>(a => a.Surname.Contains("t"));
    }
}
Clone this wiki locally