//Delete public void Delete(string shipmentNo) { ShippingPoints ShippingPoint = db.ShippingPoints.Find(shipmentNo); db.ShippingPoints.Remove(ShippingPoint); Save(); }
/// <summary> /// Inserts a pickup point /// </summary> /// <param name="pickupPoint">Pickup point</param> public virtual async Task InsertStoreShippingPoint(ShippingPoints pickupPoint) { if (pickupPoint == null) { throw new ArgumentNullException("pickupPoint"); } await _shippingPointRepository.InsertAsync(pickupPoint); await _cacheManager.RemoveByPattern(PICKUP_POINT_PATTERN_KEY); }
/// <summary> /// Deletes a pickup point /// </summary> /// <param name="pickupPoint">Pickup point</param> public virtual async Task DeleteStoreShippingPoint(ShippingPoints pickupPoint) { if (pickupPoint == null) { throw new ArgumentNullException("pickupPoint"); } await _shippingPointRepository.DeleteAsync(pickupPoint); await _cacheBase.RemoveByPrefix(PICKUP_POINT_PATTERN_KEY); }
public static ShippingPointModel ToModel(this ShippingPoints entity) { return(entity.MapTo <ShippingPoints, ShippingPointModel>()); }
public static ShippingPoints ToEntity(this ShippingPointModel model, ShippingPoints destination) { return(model.MapTo(destination)); }
//Update public void Update(ShippingPoints ShippingPoint) { db.Entry(ShippingPoint).State = EntityState.Modified; Save(); }
//Insert public void Insert(ShippingPoints ShippingPoint) { db.ShippingPoints.Add(ShippingPoint); Save(); }
//Update public void Update(ShippingPoints ShippingPoint) { objDb.Update(ShippingPoint); }
//Insert public void Insert(ShippingPoints ShippingPoint) { objDb.Insert(ShippingPoint); }