public async Task <Worker> GetWorkerAsync(int id) { return(await dbContext.Set <Worker>().FindAsync(id)); }
public void Add(Worker workerToAdd) { dbcontext.Set <Worker>().Add(workerToAdd); dbcontext.SaveChanges(); }
public async Task <Worker> GetWorkerAsync(int id) { return(await dbContext.Set <Worker>().FindAsync(id)); }
public void Add(Worker workerToAdd) { dbcontext.Set <Worker>().Add(workerToAdd); dbcontext.SaveChanges(); }