public void Delete(int jobID) { var job = new Job { JobId = jobID }; var dataContext = _dataContext as DataContext; dataContext.Entry(job).State = EntityState.Deleted; _dataContext.Save(); }
public User CreateUser(string userName, string password, Domain.Classes.Req.Domain.Entities.UserType userType, int targetUserID) { User user = new User { UserName = userName, Password = password, UserType = userType, TargetUserID = targetUserID }; ((DbSet <User>)_dataContext.Users).Add(user); _dataContext.Save(); return(user); }
public Domain.Classes.Req.Domain.Entities.Client Create(Domain.Classes.Req.Domain.Entities.Client client) { ((DbSet <Client>)_dataContext.Clients).Add(client); _dataContext.Save(); return(client); }
//public StakeHolderRepository(IReqDataSource dataContext) //{ // _dataContext = dataContext; //} public StakeHolder Create(StakeHolder stakeHolder) { ((DbSet <StakeHolder>)(_dataContext.StakeHolders)).Add(stakeHolder); _dataContext.Save(); return(stakeHolder); }
//public TakerRepository(IReqDataSource dataContext) //{ // _dataContext = dataContext; //} public Taker Create(Taker taker) { ((DbSet <Taker>)_dataContext.Takers).Add(taker); _dataContext.Save(); return(taker); }
public Domain.Classes.Req.Domain.Entities.Staff Create(Domain.Classes.Req.Domain.Entities.Staff staff) { ((DbSet <Staff>)_dataContext.Staff).Add(staff); _dataContext.Save(); return(staff); }