Esempio n. 1
0
 public IEnumerable <UserProject> GetUserProjectsByUserId(int userId)
 {
     using (var context = new CodingChallengeContext())
     {
         return(context.UserProject
                .Include("Project")
                .Where(up => up.UserId == userId)
                .ToList());
     }
 }
 public UserRepository(CodingChallengeContext context)
 {
     this.context = context;
 }