use singleton for helpers

This commit is contained in:
2020-10-14 17:57:39 -04:00
parent 86d6fdb5dd
commit e1b74a36a0
5 changed files with 21 additions and 10 deletions

View File

@ -1,4 +1,5 @@
using COA.EnterpriseServices.DataAccess.Entities;
using COA.EnterpriseServices.DataAccess;
using COA.EnterpriseServices.DataAccess.Entities;
using COA.EnterpriseServices.DataAccess.Helpers;
namespace COA.EnterpriseServices.Sandbox
@ -13,7 +14,7 @@ namespace COA.EnterpriseServices.Sandbox
private static void CreditorStuff()
{
var creditorHelper = new CreditorHelper();
var creditorHelper = Dependencies.Container.GetInstance<CreditorHelper>();
// get single creditor
var singleCreditor = creditorHelper.GetCreditor(1);
@ -36,7 +37,7 @@ namespace COA.EnterpriseServices.Sandbox
private static void ClientStuff()
{
var clientHelper = new ClientHelper();
var clientHelper = Dependencies.Container.GetInstance<ClientHelper>();
var newClient = new Client
{