I have this interface :
public interface ISign
{
Task<bool> IsRegisteredCopy();
}
Implemented it:
public class Sign : ISign
{
TabibContext context = new TabibContext();
public Task<bool> IsRegisteredCopy()
{
return context.Doctors.Any();
}
}
So I need to return Task from Any
method which is not available!
Entity Framework has various async extensions you can use in the System.Data.Entity
namespace. So you can do this:
using System.Data.Entity;
public Task<bool> IsRegisteredCopy()
{
return context.Doctors.AnyAsync();
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With