I have c# code something like below.
[code=C#]
void ExecuteSomethin g()
{
TransactionOpti ons transactionOpti ons = new TransactionOpti ons();
transactionOpti ons.IsolationLe vel = System.Transact ions.IsolationL evel.ReadUncomm itted;
transactionOpti ons.Timeout = TimeSpan.FromSe conds(Transacti onTimeOutInSeco nds);
using (TransactionSco pe transactionScop e = new TransactionScop e(TransactionSc opeOption.Requi red, transactionOpti ons))
{
action();
transactionScop e.Complete();
}
}
[/code]
i am retrieving the data by using above code
From some other code i am calling some function in c# through windows service. That function is going to delete some unwanted data from sql server database. if i wanted i initiate the request it will take 30 min to delete the data.
in this 30 min time i am unable to access other pages in my website. is there any better way to design this?
[code=C#]
void ExecuteSomethin g()
{
TransactionOpti ons transactionOpti ons = new TransactionOpti ons();
transactionOpti ons.IsolationLe vel = System.Transact ions.IsolationL evel.ReadUncomm itted;
transactionOpti ons.Timeout = TimeSpan.FromSe conds(Transacti onTimeOutInSeco nds);
using (TransactionSco pe transactionScop e = new TransactionScop e(TransactionSc opeOption.Requi red, transactionOpti ons))
{
action();
transactionScop e.Complete();
}
}
[/code]
i am retrieving the data by using above code
From some other code i am calling some function in c# through windows service. That function is going to delete some unwanted data from sql server database. if i wanted i initiate the request it will take 30 min to delete the data.
in this 30 min time i am unable to access other pages in my website. is there any better way to design this?
Comment