示例#1
0
        private async Task <Customers.Data.Version1.CustomerV1> CreateCustomerAsync(string correlationId, Contracts.Data.Version1.CustomerV1 customer)
        {
            customer.Id     = customer.Id ?? IdGenerator.NextLong();
            customer.Gender = customer.Gender ?? CustomerGenderV1.Unknown;

            return(await _customersConnector.CreateCustomerAsync(correlationId, ToPublic(customer)));
        }
示例#2
0
 public Customers.Data.Version1.CustomerV1 ToPublic(Contracts.Data.Version1.CustomerV1 customer)
 {
     return(customer == null ? null : ObjectMapper.MapTo <Customers.Data.Version1.CustomerV1>(customer));
 }