public Profile Post(Profile Model) { Model.UserID = User.FindFirstValue(ClaimTypes.NameIdentifier); Profile ReturnProfile = APILibrary.APIPost <Profile>(Model, "Profiles"); return(ReturnProfile); }
// To protect from overposting attacks, enable the specific properties you want to bind to, for // more details, see https://aka.ms/RazorPagesCRUD. public async Task <IActionResult> OnPostAsync(Tutorials model) { if (!ModelState.IsValid) { return(Page()); } else { APILibrary.APIPost <Tutorials>(model, "Tutorials"); } return(RedirectToPage("./Index")); }