public IActionResult OnPost() { if (ModelState.IsValid) { listsData.Add(message); listsData.Commit(); return(RedirectToPage("./Lists", new { messageId = message.Id })); } return(Page()); }
public IActionResult OnPost() { // switch (forCase) // { // case "forComment": if (ModelState.IsValid) { var com = listsData.Update(message); listsData.Commit(); return(RedirectToPage("./Details", new { messageId = message.Id })); } // break; //case "forLike": message.Like += 1; listsData.Update(message); listsData.Commit(); // break; //} return(Page()); }