I have problems with the following method.
public async Task<string> EditUsuario(
string id,
string userName,
string email,
string phoneNumber,
int accessFailedCount,
string concurrencyStamp,
bool emailConfirmed,
bool lockoutEnabled,
DateTimeOffset lockoutEnd,
string normalizedEmail,
string normalizedUserName,
string passwordHash,
bool phoneNumberConfirmed,
string securityStamp,
bool twoFactorEnabled,
ApplicationUser applicationUser
)
{
var resp = "";
try
{
applicationUser = new ApplicationUser
{
Id = id,
UserName = userName,
Email = email,
PhoneNumber = phoneNumber,
EmailConfirmed = emailConfirmed,
LockoutEnabled = lockoutEnabled,
LockoutEnd = lockoutEnd,
NormalizedEmail = normalizedEmail,
NormalizedUserName = normalizedUserName,
PasswordHash = passwordHash,
PhoneNumberConfirmed = phoneNumberConfirmed,
SecurityStamp = securityStamp,
TwoFactorEnabled = twoFactorEnabled,
AccessFailedCount = accessFailedCount,
ConcurrencyStamp = concurrencyStamp
};
//Actualizamos los datos
_context.Update(applicationUser);
await _context.SaveChangesAsync();
resp = "Save";
}
catch
{
resp = "No Save";
}
return resp;
}
I should update the data, but resp always returns "No Save". I have no idea what exactly is failing. Would anyone know how to tell me?
Greetings and thanks