public void Post([FromBody] Employee newEmployee) { Leadando_dbContext context = new Leadando_dbContext(); context.Employees.Add(newEmployee); context.SaveChanges(); }
public void Delete(int id) { Leadando_dbContext context = new Leadando_dbContext(); var torlendoDolgozo = (from x in context.Employees where x.EmployeeId == id select x).FirstOrDefault(); context.Remove(torlendoDolgozo); context.SaveChanges(); }