Пример #1
0
        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
            }));
        }
Пример #2
0
        public async Task <DeleteCommentResult> DeleteComment(DeleteStarModel model)
        {
            var result = await _httpClient.PostJsonAsync <DeleteCommentResult>("api/stars/deletestar", model);

            return(result);
        }