Beispiel #1
0
        public UnitOfWork(PalladinContext ctx)
        {
            this._ctx = ctx;

            #region Building repositories
            this._menuItemR          = new MenuItemRepository();
            this._menuR              = new MenuRepository();
            this._userMenuR          = new UserMenuRepository();
            this._userR              = new UserRepository();
            this._vulnerabilityLangR = new VulnerabilityLangRepository();
            this._vulnerabilityR     = new VulnerabilityRepository();
            this._projectR           = new ProjectRepository();
            this._projectVultR       = new ProjectVulnerabilityRepository();
            this._methodProtocolR    = new MethodProtocolRepository();
            this._mediaR             = new MediaRepository();
            this._mediaPvR           = new MediaPVRepository();

            this._tokenR = new TokenRepository();
            #endregion
        }
Beispiel #2
0
        //public UnitOfWork()
        //{
        //    this._ctx = new PalladinContext();

        //    #region Building repositories
        //    this._menuItemR = new MenuItemRepository(this._ctx);
        //    this._menuR = new MenuRepository(this._ctx);
        //    this._userMenuR = new UserMenuRepository(this._ctx);
        //    this._userR = new UserRepository(this._ctx);
        //    this._vulnerabilityLangR = new VulnerabilityLangRepository(this._ctx);
        //    this._vulnerabilityR = new VulnerabilityRepository(this._ctx);
        //    this._projectR = new ProjectRepository(this._ctx);
        //    #endregion
        //}

        public UnitOfWork(string connectionString)
        {
            if (this._ctx == null)
            {
                this._ctx = new PalladinContext(connectionString);
            }

            #region Building repositories
            this._menuItemR          = new MenuItemRepository(this._ctx);
            this._menuR              = new MenuRepository(this._ctx);
            this._userMenuR          = new UserMenuRepository(this._ctx);
            this._userR              = new UserRepository(this._ctx);
            this._vulnerabilityLangR = new VulnerabilityLangRepository(this._ctx);
            this._vulnerabilityR     = new VulnerabilityRepository(this._ctx);
            this._projectR           = new ProjectRepository(this._ctx);
            this._projectVultR       = new ProjectVulnerabilityRepository(this._ctx);
            this._methodProtocolR    = new MethodProtocolRepository(this._ctx);
            this._mediaR             = new MediaRepository(this._ctx);
            this._mediaPvR           = new MediaPVRepository(this._ctx);

            this._tokenR = new TokenRepository(this._ctx);
            #endregion
        }
Beispiel #3
0
 public MediaRepository(PalladinContext ctx) : base(ctx)
 {
 }
Beispiel #4
0
 public ProjectRepository(PalladinContext ctx) : base(ctx)
 {
 }
Beispiel #5
0
 public TokenRepository(PalladinContext ctx) : base(ctx)
 {
 }
Beispiel #6
0
 public UserRepository(PalladinContext ctx) : base(ctx)
 {
 }
Beispiel #7
0
 public ProjectVulnerabilityRepository(PalladinContext ctx) : base(ctx)
 {
 }
Beispiel #8
0
 public VulnerabilityLangRepository(PalladinContext ctx) : base(ctx)
 {
 }
Beispiel #9
0
 public MenuItemRepository(PalladinContext ctx) : base(ctx)
 {
 }
Beispiel #10
0
 public MethodProtocolRepository(PalladinContext ctx) : base(ctx)
 {
 }
Beispiel #11
0
 public MenuRepository(PalladinContext ctx) : base(ctx)
 {
     this._menuItemRepository = new MenuItemRepository();
 }