public async Task <IEnumerable <AppraisalConfig> > Get(AppraisalConfigParameters param)
        {
            if (param.Year != 0)
            {
                var result = await Collection.FindAsync(x => x.Year == param.Year);

                return(result.ToList());
            }
            return(await Collection.AsQueryable().ToListAsync());
        }
Beispiel #2
0
        public async Task <IActionResult> GetAppraisalConfigs([FromRoute] AppraisalConfigParameters parameter)
        {
            var resultFromRepo = await appraisalConfig.Get(parameter);

            return(Ok(mapper.Map <IEnumerable <AppraisalConfig> >(resultFromRepo)));
        }