public IActionResult PostObj([FromBody] Vote vote) { try { voteRepository.VerifyUserVoted(vote); voteRepository.VerifyOldDate(vote); // voteRepository.VerifyMidday(vote); usersRepository.VerifyUser(vote.User_name); voteRepository.VerifyMidDay(vote.Date); voteRepository.VerifyWeekend(vote.Date); services.WinnersOfDay(vote.Date); voteRepository.InsertVote(vote); return(Ok()); } catch (Exception e) { return(BadRequest(e.Message)); } }