Exemple #1
0
        public Repositories(string connection)
        {
            #region Data context creating
            // ReSharper disable UseObjectOrCollectionInitializer
            _Context = new TimezDataContext(connection);
            // ReSharper restore UseObjectOrCollectionInitializer
#if DEBUG
            _Context.CommandTimeout = 60 * 5;
            _Context.Log            = new DebuggerWriter();
#endif
            #endregion

            Boards        = BoardsRepository.Create(_Context);
            BoardsColors  = BoardsColorsRepository.Create(_Context);
            BoardsUsers   = BoardsUsersRepository.Create(_Context);
            Tasks         = TasksRepository.Create(_Context);
            TasksStatuses = TasksStatusesRepository.Create(_Context);
            Users         = UsersRepository.Create(_Context);
            Organizations = OrganizationsRepository.Create(_Context);
            Projects      = ProjectsRepository.Create(_Context);
            Comments      = CommentsRepository.Create(_Context);
            EventHistory  = EventHistoryRepository.Create(_Context);
            Invites       = InvitesRepository.Create(_Context);
            Texts         = TextsRepository.Create(_Context);
        }
Exemple #2
0
        internal static T Create(TimezDataContext context)
        {
            T t = new T {
                _Context = context
            };

            return(t);
        }