public async Task <IActionResult> personalWorkReport(string id)
        {
            int profID = int.Parse(id);
            PersonalResponse personal = await _reportsService.PersonalReport(profID);

            return(Ok(personal));
        }
예제 #2
0
        public async Task <PersonalResponse> PersonalReport(int profileID)
        {
            List <PaslaugosRezervacija> paslaugos = await _context.PaslaugosRezervacija.Where(x => x.FkDarbuotojaiidDarbuotojai == profileID).ToListAsync();

            int res = (from x in paslaugos select x.FkKlientaiidKlientai).Distinct().Count();
            PersonalResponse response = new PersonalResponse {
                AmountOfRezervations = paslaugos.Count(), AmountOfClients = res
            };

            return(response);
        }