コード例 #1
0
        /// <summary>
        /// Get information about a manager using their manager ID.
        /// </summary>
        /// <param name="managerId">Manager ID</param>
        /// <returns>Manager information</returns>
        public async Task <ManagerResponse> GetSelf(string managerId)
        {
            // Lookup the manager.
            var manager = await _database.GetManagerById(managerId);

            // Project limited information into a manager response object.
            return(new ManagerResponse
            {
                FirstName = manager.FirstName,
                LastName = manager.LastName,
                Email = manager.Email,
                IsPasswordReset = manager.IsPasswordReset
            });
        }