Exemplo n.º 1
0
        public async Task <OfficeModel> GetbyIdAsync(int id)
        {
            var office = await _repository.GetByIdAsync(id);

            //TODO: convert office.Employee list to list of EmployeeModel
            var officeModel = new OfficeModel
            {
                ContentfulId = office.ContentfulId,
                Name         = office.Name,
                Employees    = new List <EmployeeModel>()
            };

            return(officeModel);
        }
Exemplo n.º 2
0
 public async Task InsertAsync(OfficeModel officeModel)
 {
     var domainModel = _mapper.Map <OfficeModel, Office>(officeModel);
     await _repository.InsertAsync(domainModel);
 }