//Check if the string has this suggestion
var suggestion = str.Suggestions.Single(x => x.Id == suggestionId);
if (suggestion == null)
{
return false;
}
using (var db = _dbService.GetConnection())
{
await db.ExecuteAsync(@"
Update StringSuggestions
Set StateId = {=DeletedByOwner}
Where Id = @suggestionId;
Insert Into StringSuggestionHistory
(StringSuggestionId, HistoryTypeId, UserId, Comment, CreationDate)
Values (@suggestionID, {=DeletedByOwner}, @userId, @comment, @now);",
new
{
suggestionId = suggestion.Id,