mauriziopatino
ASP.NET Don't clean form after error validation
Hi, i have a GET method called Create() where just display the Create View
public IActionResult Create()
and a POST method called Store() where just store all the values from Create view form
public async Task<IActionResult> Store(ViewModel vm)
How can I return a Redirect to "Create" View without loosing form data after Fluent Validation error?
All is working correctly, the problem is that when I returned to my "Create" view I loose all the form information3 replies
❔ Entity Framework 7 model property as enum is giving conflicts when running migration
I'm trying to create a many to many "pivot" model where it haves 2 fields "GroupId" and "SubscriptionId"
I have a SubscriptionType enum:
When i run the migration it gives me this warnings:
"The foreign key property 'GroupSubscription.SubscriptionId1' was created in shadow state because a conflicting property with the simple name 'SubscriptionId' exists in the entity type, but is either not mapped, is already used for another relationship, or is incompatible with the associated primary key type. See https://aka.ms/efcore-relationships for information on mapping relationships in EF Core."
19 replies