Exemple #1
0
        private async Task <int> GetNewEmployeeIdForCompany(long companyId, CancellationToken token)
        {
            // this should really be an SP that will figure out a new employee ID for a company
            // but, here's the business logic in code form
            int lastId = await EmployeeRepository.GetLastEmployeeIdForCompany(companyId, token).ConfigureAwait(false);

            return(++lastId);
        }