public void UpdateEventDetails(string eventId, DateTime startDate, DateTime endDate) { using (SystemaDeTurnosEntities db = new SystemaDeTurnosEntities()) { Turno eventDetail = db.Turno.Where(x => x.Id_Turno == Convert.ToInt32(eventId)).First(); eventDetail.Fecha_Inicio = startDate; eventDetail.Fecha_Fin = endDate; db.SaveChanges(); } }