コード例 #1
0
 public ShipperCompanyResponse InsertShipper(ShipperCompanyList shipperCompanyRequest)
 {
     try
     {
         this.context.Add(shipperCompanyRequest);
         this.context.SaveChanges();
         this.response.ShipperCompany = shipperCompanyRequest;
     }
     catch (Exception ex)
     {
         this.response.Success = false;
         this.response.OperatonExceptionMessage = ex.Message;
     }
     return(this.response);
 }
        public async Task <ActionResult> CreateShipmentList([FromBody] ShipperCompanyList shipperCompanyRequest)
        {
            ShipperCompanyResponse shipperCompanyResponse = _shipperCompnayService.InsertShipper(shipperCompanyRequest);

            try
            {
                if (shipperCompanyResponse.Success)
                {
                    // TO DO
                }
                else
                {
                    // Log the error here
                }
            }
            catch (Exception ex)
            {
                AuditEventEntry.WriteEntry(ex);
            }

            return(Ok(shipperCompanyResponse));
        }