コード例 #1
0
ファイル: AssessmentManager.cs プロジェクト: itcms/cset
        /// <summary>
        /// Returns a collection of Assessment objects that are connected to the specified user.
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        public IEnumerable <Assessments_For_User> GetAssessmentsForUser(int userId)
        {
            List <Assessments_For_User> list = new List <Assessments_For_User>();

            using (var db = new CSET_Context())
            {
                // list = db.Assessments_For_User.Where(x => x.UserId == userId).ToList();
                list = db.usp_AssessmentsForUser(userId).ToList();
            }

            return(list);
        }