public async Task <IActionResult> DeleteStar(DeleteStarModel model) { ctx.Stars.Remove( ctx.Stars.Single(c => c.Id == model.StarId) ); await ctx.SaveChangesAsync(); return(Ok(new DeleteStarResult() { Successful = true })); }
public async Task <DeleteCommentResult> DeleteComment(DeleteStarModel model) { var result = await _httpClient.PostJsonAsync <DeleteCommentResult>("api/stars/deletestar", model); return(result); }