public void InsertSqlAppointmentResource(SqlAppointmentResource sqlAppointmentResource) { if ((sqlAppointmentResource.EntityState != EntityState.Detached)) { this.ObjectContext.ObjectStateManager.ChangeObjectState(sqlAppointmentResource, EntityState.Added); } else { this.ObjectContext.SqlAppointmentResources.AddObject(sqlAppointmentResource); } }
public void DeleteSqlAppointmentResource(SqlAppointmentResource sqlAppointmentResource) { if ((sqlAppointmentResource.EntityState != EntityState.Detached)) { this.ObjectContext.ObjectStateManager.ChangeObjectState(sqlAppointmentResource, EntityState.Deleted); } else { this.ObjectContext.SqlAppointmentResources.Attach(sqlAppointmentResource); this.ObjectContext.SqlAppointmentResources.DeleteObject(sqlAppointmentResource); } }
public void UpdateSqlAppointmentResource(SqlAppointmentResource currentSqlAppointmentResource) { this.ObjectContext.SqlAppointmentResources.AttachAsModified(currentSqlAppointmentResource); }