|
|
От: | Dog | |
| Дата: | 20.05.09 14:09 | ||
| Оценка: | |||
/// When the <b>DbManager</b> goes out of scope, it does not close the internal connection object.
/// Therefore, you must explicitly close the connection by calling <see cref="Close"/> or
/// <see cref="Dispose(bool)"/>. Also, you can use the C# <b>using</b> statement.
public abstract class TestAccessor : DataAccessor
{
[SqlQuery("SELECT @intVal")]
public abstract int Test(int @intVal);
}[OperationContract]
public int Test(int val)
{
var o = TypeAccessor<TestAccessor>.CreateInstance();
using (var db = o.GetDbManager())
{
return o.Test(10);
}
}