コード例 #1
0
 public bool CheckRelationship(string Id)
 {
     using (var db = new BugTrackingEntities())
     {
         int count = db.AspNetRoles.Where(f => db.AspNetUserRoles.Where(fb => fb.Active == true).Select(fb => fb.RoleId).Contains(f.Id) && f.Id == Id && f.Active == true).Count();
         return(count == 0);
     }
 }
コード例 #2
0
 public bool CheckExisting(string Id)
 {
     using (var db = new BugTrackingEntities())
     {
         int count = db.AspNetRoles.Where(x => x.Id == Id && x.Active == true).Count();
         return(count != 0);
     }
 }
コード例 #3
0
 public bool BeUniqueName(string Name)
 {
     using (var db = new BugTrackingEntities())
     {
         int count = db.AspNetRoles.Where(x => x.Name == Name && x.Active == true).Count();
         return(count == 0);
     }
 }
コード例 #4
0
 public bool BeUniqueName(string Name, string Section)
 {
     using (var db = new BugTrackingEntities())
     {
         int count = db.Categories.Where(x => x.Name == Name && x.Section == Section && x.Active == true).Count();
         return(count == 0);
     }
 }
コード例 #5
0
 public bool BeUniqueEmail(string Email)
 {
     using (var db = new BugTrackingEntities())
     {
         int count = db.Organizations.Where(x => x.Email == Email && x.Active).Count();
         return(count == 0);
     }
 }
コード例 #6
0
 public bool BeUniqueName(string Name)
 {
     using (var db = new BugTrackingEntities())
     {
         int count = db.Organizations.Where(x => x.Name == Name && x.Active).Count();
         return(count == 0);
     }
 }
コード例 #7
0
 public bool BeUniqueResp(long prod, long org, long ID)
 {
     using (var db = new BugTrackingEntities())
     {
         int count = db.ProductOrganisations.Where(x => x.ID_Product == prod && x.ID_Organisation == org && x.Active == true && x.ID != ID).Count();
         return(count == 0);
     }
 }
コード例 #8
0
        public UnitOfWork()
        {
            context = new BugTrackingEntities();

            RoleRepository              = new RoleRepository(context);
            UserRepository              = new UserRepository(context);
            BugStatusRepository         = new BugStatusRepository(context);
            BugPriorityRepository       = new BugPriorityRepository(context);
            BugRepository               = new BugRepository(context);
            ProjectTechnologyRepository = new ProjectTechnologyRepository(context);
            ProjectStatusReporitory     = new ProjectStatusRepository(context);
            ProjectRepository           = new ProjectRepository(context);
            projectDevelopersRepository = new ProjectDevelopersRepository(context);
        }
コード例 #9
0
 public CategoryRepository(BugTrackingEntities context) : base(context)
 {
 }
コード例 #10
0
 protected BaseRepository(BugTrackingEntities context)
 {
     Context = context;
 }
コード例 #11
0
 public UserRepository(BugTrackingEntities context) : base(context)
 {
     Context = context;
 }
コード例 #12
0
 public ProjectDevelopersRepository(BugTrackingEntities context) : base(context)
 {
     Context = context;
 }
コード例 #13
0
 public BugPriorityRepository(BugTrackingEntities context) : base(context)
 {
     Context = context;
 }