コード例 #1
0
        public Profile Post(Profile Model)
        {
            Model.UserID = User.FindFirstValue(ClaimTypes.NameIdentifier);
            Profile ReturnProfile = APILibrary.APIPost <Profile>(Model, "Profiles");

            return(ReturnProfile);
        }
コード例 #2
0
 // 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"));
 }