示例#1
0
        public void CreateUser()
        {
            var newUser = new User
            {
                UserId = 1,
                Name = "Eva"
            };

            var db = new Context();
            db.Users.Add(newUser);
            db.SaveChanges();
        }
示例#2
0
 Project[] ListProject()
 {
     using (var db = new Context())
     {
         return db.Projects.ToArray();
     }
 }
示例#3
0
 Company[] ListCompany()
 {
     using (var db = new Context())
     {
         return db.Companies.ToArray();
     }
 }
示例#4
0
 ProjectLeader[] ListProjectLeader()
 {
     using (var db = new Context())
     {
         return db.ProjectLeaders.ToArray();
     }
 }