public static Task <TEntity> Find <TEntity>(this FaToolDbEntities ctx, object id) where TEntity : class, IEntity { return(ctx.Set <TEntity>().FindAsync(id)); }
public static async Task <bool> Exists <TEntity>(this FaToolDbEntities ctx, Expression <Func <TEntity, bool> > predicate) where TEntity : class, IEntity { return(await ctx.Set <TEntity>().AnyAsync(predicate)); }