Hi, i have a controller that creates a table using EF with automated value for id.
var cust = new Cutomer
{
Name = "James",
Description = "Believs in ghosts"
}
_context.Customer.Add(cust);
await _context.SaveChangesAsync();but i would like to return the created id value for this table so i could go on to the newly created page.
is this possible? Could i just return RedirectToAction(nameof(YourProfile), new { id = cust.Id} )
I can't test it where I am right now because I don't have windows and i don't know how to create db on mac.