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);
     }
 }
 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);
     }
 }
 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);
     }
 }
Ejemplo n.º 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);
     }
 }
 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);
     }
 }
 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);
     }
 }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 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);
        }
 public CategoryRepository(BugTrackingEntities context) : base(context)
 {
 }
Ejemplo n.º 10
0
 protected BaseRepository(BugTrackingEntities context)
 {
     Context = context;
 }
Ejemplo n.º 11
0
 public UserRepository(BugTrackingEntities context) : base(context)
 {
     Context = context;
 }
Ejemplo n.º 12
0
 public ProjectDevelopersRepository(BugTrackingEntities context) : base(context)
 {
     Context = context;
 }
 public BugPriorityRepository(BugTrackingEntities context) : base(context)
 {
     Context = context;
 }