using System.Security.Claims; var userId = User.FindFirstValue(ClaimTypes.NameIdentifier); Note that this extension method only works for Users inside controllers, not view components, as the view component User is of IPrincipal.
Month: March 2024
How to check seed value of tables in SQL
–View the current value: DBCC CHECKIDENT (“{table name}”, NORESEED) –Set it to the max value plus one: DBCC CHECKIDENT (“{table name}”, RESEED) –Set it to a spcefic value: DBCC CHECKIDENT (“{table name}”, RESEED, {New Seed Value})