I have a `Customer` business entity in `Domain` project, I want to instantiate it in `DomainService` project based on its properties. There are business logic that needs enforcement when it is created, e.g. `Salary` depends `FirstName` (example only). I don’t want its setters being public which loses encapsulation.

How to instantiate/initialize it without losing encapsulation. The setter's private can be changed, not public.

```
 public class Customer
    {
        public int Id { get; private set; }

        public string Firstname { get; private set; }

        public string Surname { get; private set; }

        public decimal Salary { get; private set; }
        //... other properties
    }

```