public async Task <TodoItemComment> Update(TodoItemComment item) { using (var sqlConnection = _connectionFactory.OpenSqlConnection()) { return(await sqlConnection.QuerySingleAsync <TodoItemComment>( "[dbo].[TodoItemsComment_update]", param : new { @todoItemCommentId = item.Id, @content = item.Content }, commandType : CommandType.StoredProcedure)); } }
public async Task <TodoItemComment> Add(TodoItemComment item) { using (var sqlConnection = _connectionFactory.OpenSqlConnection()) { return(await sqlConnection.QuerySingleAsync <TodoItemComment>( "[dbo].[TodoItemsComment_add]", param : new { @userAccountId = item.UserAccountId, @content = item.Content, @todoItemId = item.TodoitemId }, commandType : CommandType.StoredProcedure)); } }