Commit 17a7a1c9 authored by hasan khaddour's avatar hasan khaddour

Remove Duplicated value objects

parent 0c387bd4
...@@ -6,5 +6,8 @@ using System.Threading.Tasks; ...@@ -6,5 +6,8 @@ using System.Threading.Tasks;
namespace PSManagement.Contracts.Customers.Requests namespace PSManagement.Contracts.Customers.Requests
{ {
public record AddContactInfoRequest(int CustomerId, String ContactType, String ContactValue); public record AddContactInfoRequest(
int CustomerId,
String ContactType,
String ContactValue);
} }
using System; using PSManagement.Domain.Customers.ValueObjects;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
...@@ -8,14 +9,8 @@ namespace PSManagement.Contracts.Customers.Requests ...@@ -8,14 +9,8 @@ namespace PSManagement.Contracts.Customers.Requests
{ {
public record CreateCustomerRequest( public record CreateCustomerRequest(
String CustomerName, String CustomerName,
AddressRecord Address , Address Address ,
String Email String Email
); );
public record AddressRecord(
String StreetName ,
int StreetNumber,
int ZipCode ,
String City
);
} }
using System; using PSManagement.Domain.Customers.ValueObjects;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
...@@ -9,6 +10,6 @@ namespace PSManagement.Contracts.Customers.Requests ...@@ -9,6 +10,6 @@ namespace PSManagement.Contracts.Customers.Requests
public record UpdateCustomerRequest( public record UpdateCustomerRequest(
int CustomerId, int CustomerId,
String CustomerName, String CustomerName,
AddressRecord Address, Address Address,
String Email); String Email);
} }
using PSManagement.Contracts.Customers.Requests; using PSManagement.Contracts.Customers.Requests;
using PSManagement.Domain.Customers.ValueObjects;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
...@@ -13,7 +14,7 @@ namespace PSManagement.Contracts.Customers.Responses ...@@ -13,7 +14,7 @@ namespace PSManagement.Contracts.Customers.Responses
public int Id { get; set; } public int Id { get; set; }
public String CustomerName { get; set; } public String CustomerName { get; set; }
public String Email { get; set; } public String Email { get; set; }
public AddressRecord Address { get; set; } public Address Address { get; set; }
public IEnumerable<ContactInfoRecord> ContactInfo { get; set; } public IEnumerable<ContactInfoRecord> ContactInfo { get; set; }
} }
} }
...@@ -4,4 +4,8 @@ ...@@ -4,4 +4,8 @@
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net5.0</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\PSManagement.Domain\PSManagement.Domain.csproj" />
</ItemGroup>
</Project> </Project>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment