Exemplo n.º 1
0
        public async Task <Announcement> AddAnnouncement(Announcement announcement, User CurrentUser)
        {
            announcement.CreatedAt = DateTime.Now;
            announcement.User      = CurrentUser;
            await announcementRepository.AddAnnouncementAsync(announcement);

            await unitOfWork.CompleteAsync();

            return(announcement);
        }