Beispiel #1
0
    public IActionResult Delete(int id)
    {
        var gram = grams.Get(id);

        if (gram != null)
        {
            return(NotFound());
        }

        grams.Delete(id);
        return(Ok());
    }
Beispiel #2
0
        public async Task <IActionResult> OnPostDelete()
        {
            await _post.Delete(ID.Value);

            return(RedirectToPage("/Index"));
        }