public async Task <DataResult <List <FamilyModel> > > GetPartOfFamilies(int skip, int take) { try { List <Family> entities = await _familyRepository.GetPart(skip, take); List <FamilyModel> models = entities.Select(_mapper.Map).ToList(); return(new DataResult <List <FamilyModel> > { Success = true, Data = models, }); } catch (Exception ex) { _logger.LogError(ex, "Problems with getting all familyes"); return(new DataResult <List <FamilyModel> > { Success = false, ErrorCode = ErrorCode.InternalError, }); } }