This example overrides the default isolation level (READ COMMITTED) for a specific query. It allows users to retrieve information without being locked by another process that modifies the same data.
Example Overview
- Implement the IDBCommandInterceptor interface (
NolockInterceptor.cs
in this example). Call the IDBCommandInterceptor.CommandCreated(String, IDbCommand) method and specifyCommandText
to execute. - Call the XRDesignMdiController.AddService method to register the interceptor.
Files to Review
More Examples
Reporting for ASP NET.Core - Implement Row-Level Security
Documentation
Example Code
C#using DevExpress.DataAccess.Sql;
using System;
namespace XtraReportApp {
public partial class Form1 : DevExpress.XtraEditors.XtraForm {
public Form1() {
InitializeComponent();
reportDesigner1.AddService(typeof(IDBCommandInterceptor), new NolockInterceptor());
}
private void Form1_Load(object sender, EventArgs e) {
reportDesigner1.OpenReport(new XtraReport1());
}
}
}