How can ModelState be accessed in HttpPut if it is only created in HttpPost?

“The ModelState represents a collection of name and value pairs that were submitted to the server during a POST.” That is the best definition I have found for the ModelState property. So I have some code using a web api that Creates a customer and Updates a customer, and my question is, since I have accessed ModelState in CreateCustomer, wont the ModelState always be not valid if I hadnt already submitted a Post request with CreateCustomer? Or is the ModelState updated with both PUT and Post requests? Because according to the definition above, the ModelState property wont be initialized until I create a customer, and in my UpdateCustomer method, I need to check if the customer object given in the parameters is the one that is valid, not any Model that was submitted to the server during a different POST request.

ASP NET Core MVC how to display data from SQL table in List Razor Template by UserID foreign key

I have a Identity tables like AspNetUsers and others. I created migration Files with foreign key UserID to Id from AspNetUsers table for save files in Files table with logged in user Id. But in my FileManager View I see all files from Files table, but I need to display files only with UserID = Id from AspNetUsers (I mean with Id of logged in user). How Can I do it?

How to enable content security policy for identity server?

I have a micro front-end which is connected to my identity server. In order for a user to access the micro front-end, the user needs to be authenticated via this ID server. The micro front-end needs to be embedded in an iframe in my main application but since this micro front-end requires the ID server, I am getting an error on the console. Everything works fine before embedding this micro front-end but I get this problem as soon it gets into the iframe.