public async Task <IActionResult> Post([FromForm] AnnouncementViewModel announcementModel)
        {
            var mapper = new MapperConfiguration(cfg => cfg.CreateMap <AnnouncementViewModel, AnnouncementDto>())
                         .CreateMapper();

            var announcementDto = mapper.Map <AnnouncementDto>(announcementModel);

            await _announcementService.AddAnnouncementAsync(announcementDto);

            return(Ok());
        }
 public async Task <IActionResult> AddAnnouncement([FromBody] AddAnnouncementDTO addAnnouncement)
 {
     return(await _announcementService.AddAnnouncementAsync(addAnnouncement).ConfigureAwait(false).GetObjectResponseAsync <AddAnnouncementDTO>("Success").ConfigureAwait(false));
 }