, ben yazdım:System.Action nasıl kullanılır? BLL sınıfta
Private List<T> GetData(string a, string b)
{
TryAction(()=>{
//Call BLL Method to retrieve the list of BO.
return BLLInstance.GetAllList(a,b);
});
}
BLL temel sınıf içinde, bir yöntem vardır:
protected void TryAction(Action action)
{
try
{
action();
}
catch(Exception e)
{
// write exception to output (Response.Write(str))
}
}
nasıl jenerik dönüş türü ile TryAction()
yöntemi kullanabilirsiniz? lütfen bir öneriniz var.
sayesinde çok yardımcı bir örnektir. – Pravin