コード例 #1
0
        private static Custodian BuildCustodian(int?id)
        {
            Custodian model = new Custodian();

            using (gssdb_cards context = new gssdb_cards())
            {
                var user = from u in context.DNN_Users
                           where u.UserID == id
                           select new { firstname = u.FirstName, lastname = u.LastName, email = u.Email, id = u.UserID };


                foreach (var item in user)
                {
                    model.Email     = item.email;
                    model.Firstname = item.firstname;
                    model.Lastname  = item.lastname;
                    model.ID        = item.id;
                    model.SOLID     = model.GetSOLID(item.id);
                }
            }
            return(model);
        }