コード例 #1
0
 public CustomerDto Create()
 {
     var data = new CustomerData();
       data.CustomerId = Guid.NewGuid();
       MockDb.Customers.Add(data);
       return CreateDtoFromData(data);
 }
コード例 #2
0
 public static CustomerDto CreateDtoFromData(CustomerData data)
 {
     return new CustomerDto()
       {
     Id = data.CustomerId,
     Name = data.Name,
     EmailAddress = data.EmailAddress,
     ReviewIds = new List<Guid>(data.ReviewIds)
       };
 }