public async Task <Project> GetByIdProject(int id) { try { Project project = await Db.Set <Project>() .AsNoTracking() .FirstOrDefaultAsync(x => x.Id == id); return(project); } catch (Exception ex) { throw new Exception("Error: ", ex); } }
public async Task <List <Course> > GetAllCourses() { return(await Db.Set <Course>() .AsNoTracking() .ToListAsync()); }