public int Insert(TraHoldSeatCallBackLogEntity t) { using (BrightourDbContext db = new BrightourDbContext()) { var log = db.TraHoldSeatCallBackLog.Add(t); db.SaveChanges(); return(log.LogId); } }
public int Inster(RegisterCustomerEntity entity) { using (BrightourDbContext db = new BrightourDbContext()) { var log = db.RegisterCustomer.Add(entity); db.SaveChanges(); return(log.Id); } }
public int Insert(TraOrderEntity t) { using (BrightourDbContext db = new BrightourDbContext()) { var log = db.TraOrder.Add(t); db.SaveChanges(); return(log.OrderId); } }
public int Insert(ContactInfoEntity t) { using (BrightourDbContext db = new BrightourDbContext()) { var log = db.ContactInfo.Add(t); db.SaveChanges(); return(log.Contactid); } }
public int Insert(AccountEntity t) { using (BrightourDbContext db = new BrightourDbContext()) { var log = db.AccountInfo.Add(t); db.SaveChanges(); return(log.Aid); } }
public int Insert(Tra12306AccountEntity t) { using (BrightourDbContext db = new BrightourDbContext()) { var log = db.Tra12306AccountEntity.Add(t); db.SaveChanges(); return(log.PassId); } }
public int Insert(TraModOrderDetailEntity t) { using (BrightourDbContext db = new BrightourDbContext()) { var log = db.TraModDetail.Add(t); db.SaveChanges(); return(log.TravelId); } }
public int Insert(TraAddressEntity t) { using (BrightourDbContext db = new BrightourDbContext()) { var log = db.TraAddress.Add(t); db.SaveChanges(); return(log.Aid); } }
public int Delete(TraHoldSeatCallBackLogEntity t) { using (BrightourDbContext db = new BrightourDbContext()) { db.TraHoldSeatCallBackLog.Attach(t); db.TraHoldSeatCallBackLog.Remove(t); int i = db.SaveChanges(); //string sql = $"delete from dbo.Tra_HoldSeatCallBackLog where logid={t.LogId}"; //db.Database.ExecuteSqlCommand(sql); if (i > 0) { return(0); } return(-1); } }