Example #1
0
            public async Task UpdateAsync(Carrier carrier)
            {
                _context.Carriers.Update(carrier);

                await _context.SaveChangesAsync();

            }
Example #2
0
            public async Task<int> AddAsync(Carrier carrier)
            {
                carrier.Picture = Convert.FromBase64String(FakeImages.Carriers[DEFAULT_PICTURE]);

                _context.Carriers.Add(carrier);

                await _context.SaveChangesAsync();

                return carrier.CarrierId;

            }
Example #3
0
 public void CopyTo(Carrier carrier)
 {
     carrier.Name = this.CompanyName;
     carrier.Address = this.Address;
     carrier.ZipCode = this.ZipCode;
     carrier.City = this.City;
     carrier.Country = this.Country;
     carrier.State = this.State;
     carrier.CompanyID = this.CompanyID;
     carrier.Email = this.Email;
     carrier.Description = this.Description;
 }