using YourNamespace.Entities.Enums; namespace YourNamespace.Entities { public class Employee { public int Id { get; private set; } public string FirstName { get; private set; } public string LastName { get; private set; } public EmployeePost EmployeePost { get; private set; } public static Employee CreateEntity(int id, string firstName, string lastName, EmployeePost employeePost) { return new Employee { Id = id, FirstName = firstName ?? string.Empty, LastName = lastName ?? string.Empty, EmployeePost = employeePost }; } } }