Ejemplo n.º 1
0
        private static void EditShipper(int shipperId, string newCompanyName)
        {
            System.Console.WriteLine("Editing : {0}", shipperId);

            IShipper shipper = shipperRepository.GetShipperById(shipperId);

            if (shipper != null)
            {
                shipper.CompanyName = newCompanyName;

                int rowsAffected = shipperRepository.UpdateShipper(shipper);

                System.Console.WriteLine("Rows affected: {0}", rowsAffected);
            }
        }
Ejemplo n.º 2
0
 public async Task <int> UpdateShipper(ShipperModel model)
 {
     return(await _shipperRepository.UpdateShipper(model));
 }