Exemplo n.º 1
0
        /// <summary>
        /// 删除物流
        /// </summary>
        /// <param name="id"></param>
        public virtual async Task DeleteAsync(int id)
        {
            var logistics = await ShipmentRepository.FirstOrDefaultAsync(id);

            if (logistics != null)
            {
                await ShipmentRepository.DeleteAsync(logistics);
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// 根据物流单号查找物流
 /// </summary>
 /// <param name="logisticsNumber"></param>
 /// <returns></returns>
 public virtual async Task <Shipment> FindByLogisticsNumberAsync(string logisticsNumber)
 {
     return(await ShipmentRepository.FirstOrDefaultAsync(s => s.LogisticsNumber == logisticsNumber));
 }
Exemplo n.º 3
0
 /// <summary>
 /// 根据id查找物流
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public virtual async Task <Shipment> FindByIdAsync(long id)
 {
     return(await ShipmentRepository.FirstOrDefaultAsync(id));
 }