-
-
Save explorer14/479cc1b790b0ba61fc5c7155d6c35cb2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Genny; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace ConsoleApp9.Domain | |
{ | |
[GenerateMappedDto] | |
public sealed class Employee | |
{ | |
public Employee( | |
string name, | |
DateTime dateOfJoining) | |
{ | |
Id = Guid.NewGuid(); | |
Name = name; | |
DateOfJoining = dateOfJoining; | |
} | |
public Guid Id { get; } | |
public string Name { get; } | |
public DateTime DateOfJoining { get; } | |
public Address? HomeAddress { get; set; } | |
} | |
[GenerateMappedDto] | |
public class Address | |
{ | |
public Address( | |
string streetName, | |
int houseNumber, | |
string postCode) | |
{ | |
StreetName = streetName; | |
HouseNumber = houseNumber; | |
PostCode = postCode; | |
} | |
public string StreetName { get; } | |
public int HouseNumber { get; } | |
public string PostCode { get; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment