public virtual async Task UpdateSupplierAsync(CreateSupplierInput input)
        {
            try
            {
                Debug.Assert(input.Id != null, "input.User.Id should be set.");

                var supplier = await _supplierManager.GetAsync(input.Id.Value);

                //Update user properties
                input.MapTo(supplier); //Passwords is not mapped (see mapping configuration)
                await _supplierRepository.UpdateAsync(supplier);
            }
            catch (Exception ex)
            {
                var e = ex;
            }
        }
示例#2
0
 public async Task CreateSupplier(CreateSupplierInput input)
 {
     var supplier = input.MapTo <Supplier>(); await _supplierRepository.InsertAsync(supplier);
 }