Esempio n. 1
0
        public Task Create(Task newTask)
        {
            int id = _repo.Create(newTask);

            newTask.Id = id;
            return(newTask);
        }
Esempio n. 2
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);
        }
Esempio n. 3
0
        internal Task Create(Task newTask)
        {
            int id = _repo.Create(newTask);

            newTask.id = id;
            return(newTask);
        }
 internal void Create(Task ts, string id)
 {
     List list = _ls.GetById(ts.ListId);
     if (list == null)
     {
         throw new Exception("Invalid Id");
     }
     if (list.CreatorId != id)
     {
         throw new NotAuthorized("Not The Owner of this Party");
     }
     _repo.Create(ts);
 }
Esempio n. 5
0
 public void Post(Tasks t)
 {
     repo.Create(t);
 }
Esempio n. 6
0
 public MyTask Create(MyTask newTask)
 {
     newTask.Id = _repo.Create(newTask);
     return(newTask);
 }
Esempio n. 7
0
 internal Tasky Create(Tasky newTask)
 {
     return(_repo.Create(newTask));
 }