public int RemoveFromProblem(ProblemTagDto problemTag) { using (IDbConnection dbConnection = Connection) { return(dbConnection.Execute(TagQueries.RemoveFromProblem, problemTag)); } }
public int AddToProblem(ProblemTagDto problemTag) { using (IDbConnection dbConnection = Connection) { return(dbConnection.Execute(TagQueries.AddToProblem, problemTag)); } }
public IActionResult AddToProblem([FromBody] ProblemTagDto problemTag) { if (_tagService.AddToProblem(problemTag)) { return(Ok()); } return(BadRequest()); }
public bool RemoveFromProblem(ProblemTagDto problemTag) { if (_tagRepository.RemoveFromProblem(problemTag) != 0) { return(true); } return(false); }
public bool AddToProblem(ProblemTagDto problemTag) { if (_tagRepository.AddToProblem(problemTag) != 0) { return(true); } return(false); }
public bool RemoveFromProblem(int tagId, int problemId) { var problemTag = new ProblemTagDto { ProblemId = problemId, TagId = tagId }; if (_tagRepository.RemoveFromProblem(problemTag) != 0) { return(true); } return(false); }