public virtual bool Update(ShipmentConfig obj) { //var getObj = GetById(obj.Id); //_db.Entry(getObj).State = System.Data.Entity.EntityState.Detached; _db.Entry(obj).State = EntityState.Modified; //_db.ShipmentConfigs.Attach(obj); _db.SaveChanges(); return(true); }
public void Detach(ShipmentConfig obj) { _db.Entry(obj).State = EntityState.Detached; }
public bool Update(ShipmentConfig obj) { return(_shipmentConfigRepository.Update(obj)); }
//public virtual IEnumerable<ShipmentConfig> GetList(int take) //{ // return _db.ShipmentConfigs.Take(take).ToList(); //} public virtual long Add(ShipmentConfig obj) { _db.ShipmentConfigs.Add(obj); _db.SaveChanges(); return(obj.Id); }
//public IEnumerable<ShipmentConfig> GetList(int take) //{ // return _shipmentConfigRepository.GetList(take); //} public long Add(ShipmentConfig obj) { return(_shipmentConfigRepository.Add(obj)); }