示例#1
0
        public async Task <DataResult <List <SpecieViewModel> > > GetPartOfSpecieViews(int skip, int take)
        {
            try
            {
                List <SpecieViewModel> models = await _specieRepository.GetModelsPart(skip, take);

                return(new DataResult <List <SpecieViewModel> >
                {
                    Success = true,
                    Data = models,
                });
            }
            catch (Exception ex)
            {
                _logger.LogError(ex, $"Problems with getting Species");
                return(new DataResult <List <SpecieViewModel> >
                {
                    Success = false,
                    ErrorCode = ErrorCode.InternalError,
                });
            }
        }