Is there anything wrong with this code? My entity is not getting updated.
public ActionResult UpdateNota(string notas)
{
if (Request.IsAjaxRequest())
{
RegistroEntities registroEntities = new RegistroEntities();
Nota nota = JsonConvert.DeserializeObject<Nota>(notas);
registroEntities.AttachTo("Notas",nota);
registroEntities.ApplyCurrentValues("Notas", nota);
registroEntities.SaveChanges(SaveOptions.DetectChangesBeforeSave);
return Json(new {success=true});
}
return View();
}