public async Task <Comments> CreateComment(Comments entity) { entity.CommentTime = DateTime.Now; await _comments.Create(entity); return(_comments.WhereByUserId(entity.UserId).Result.Last()); }
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); }
public int CreateNewComment(string comment) { var commentDAL = new Comments() { Comment = comment }; int id = commentRepository.Create(commentDAL); return(id); }
internal Comment Create(Comment newComment) { return(_repo.Create(newComment)); }
public Comment Create(Comment newComment) { return(_repo.Create(newComment)); }
internal Comment Create(Comment newComment) { newComment.Id = _cr.Create(newComment); return(newComment); }
public Comment Create(Comment newComment) { newComment.Id = _repo.Create(newComment); return(newComment); }
// POST: api/ManagerComment public void Post(ManagerComment comment) { CommentsRepository.Create(comment); }
// POST: api/ManagerComment public void Post(managercomments comment) { CommentsRepository.Create(comment); }