public void CreateUser() { var newUser = new User { UserId = 1, Name = "Eva" }; var db = new Context(); db.Users.Add(newUser); db.SaveChanges(); }
Project[] ListProject() { using (var db = new Context()) { return db.Projects.ToArray(); } }
Company[] ListCompany() { using (var db = new Context()) { return db.Companies.ToArray(); } }
ProjectLeader[] ListProjectLeader() { using (var db = new Context()) { return db.ProjectLeaders.ToArray(); } }