protected TResult ExecuteCommand <TResult>(Func <RepositoryLocator, TResult> command) where TResult : class//TODO: Not sure how to deal with it, IDtoResponseWrapper { //TODO: Not sure now about it Container.RequestContext = RequestContext; using (ITransactionManager manager = tFactory.CreateManager()) { return(manager.ExecuteCommand(command)); } }
public ServiceBase() { string cs = GlobalContext.ApplicationSetting.CS; tFactory = new TransactionFactory(cs); //TODO: Varify with Sunil and think for proper place for these codes. //Previous comment by RJ: Need to have request context to call this method using (ITransactionManager manager = tFactory.CreateManager()) { var res = manager.ExecuteReadOnlyCommand <IAccountRepository>(Handler); //var accounts = res.FindAllAccounts(); } }