Пример #1
0
        public BaseUoW(BaseRepository[] repositories)
        {
            subjects = repositories;

            this.ValidateInstance();
            //NOTE: ValidateInstance should be called
            //      In the derived class the base constructor
            //      should be called post creation of context
            //      The repository collection should have minimum
            //      one repository to work on. The method
            //      AreRepositoriesInitialized should be implemented
            //      to do that check.
            //
            //      The Repository should have a property setter
            //      for them to get the instance of DbContext on which
            //      they will operate. This cannot be a constructor
            //      parameter since, Repository is passed to UoW
            //      from consumer. Consumer is not aware of the
            //      DbContext classes
        }
Пример #2
0
 public SaveMessageWork(BaseRepository[] required)
     : base(required)
 {
 }