public async Task DeleteMessage(Guid postId, HttpClient httpClient) { await httpClient.DeleteAsync($"Post/{postId}"); var deletedMessage = PostModels.FirstOrDefault(postModel => postModel.PostId == postId); PostModels.Remove(deletedMessage); ChangePost?.Invoke(); }
public async Task SendMessage(Message message, HubConnection hubConnection) { await hubConnection.SendAsync(SignalRMehod.SendMessage, message); ChangePost?.Invoke(); }