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

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