public async Task <IEnumerable <Engagement> > GetEngagements(DateTime date) { SAMWorkbenchDB_DEVEntities1 context = new SAMWorkbenchDB_DEVEntities1(); return(await context.Engagements.Where(w => w.CreatedOn >= date && (w.isDeleted == null || w.isDeleted.Value == false)).ToListAsync()); }
public async Task <Engagement> GetEngagements(int id) { SAMWorkbenchDB_DEVEntities1 context = new SAMWorkbenchDB_DEVEntities1(); return(await context.Engagements.Where(w => w.EngagementId == id).FirstOrDefaultAsync()); }
public async Task <IEnumerable <Engagement> > GetEngagements(string search) { SAMWorkbenchDB_DEVEntities1 context = new SAMWorkbenchDB_DEVEntities1(); return(await context.Engagements.Where(w => w.EngagementName == search && (w.isDeleted == null || w.isDeleted.Value == false)).ToListAsync()); }
private async Task <IEnumerable <Engagement> > GetAllEngagements() { SAMWorkbenchDB_DEVEntities1 context = new SAMWorkbenchDB_DEVEntities1(); return(await context.Engagements.ToListAsync()); }