예제 #1
0
        public static CreatedEmployeeCommandRequest MapToCommand(this CriarProfessorModel model)
        {
            var entity = new People(model.Cpf, model.Nome, model.Email, PeopleType.Employee);

            entity.AddUser(new User(model.Login, model.senha));
            entity.AddEmployee(new Employee(model.Codigo));
            var result = new CreatedEmployeeCommandRequest(entity);

            return(result);
        }