public virtual void AcceptChanges(long id, string SessionId) { WorksheetContext ctx = Session.GetSessionData(SessionId, "WorksheetContext").CastToType <WorksheetContext>(); Screening screening = ctx.Screenings.FirstOrDefulatEntity(s => s.Id == id); if (screening.IsNotNull()) { screening.AcceptChanges(); } }