added controller stub. before changing idataaccess to abstract class
This commit is contained in:
@ -6,6 +6,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\COA.EnterpriseServices.Creditor\COA.EnterpriseServices.Creditor.csproj" />
|
||||
<ProjectReference Include="..\COA.EnterpriseServices.DataAccess.EntityFramework\COA.EnterpriseServices.DataAccess.EntityFramework.csproj" />
|
||||
<ProjectReference Include="..\COA.EnterpriseServices.DataAccess.QuickBase\COA.EnterpriseServices.DataAccess.QuickBase.csproj" />
|
||||
<ProjectReference Include="..\COA.EnterpriseServices.DataAccess\COA.EnterpriseServices.DataAccess.csproj" />
|
||||
|
@ -1,6 +1,7 @@
|
||||
using COA.EnterpriseServices.DataAccess;
|
||||
using COA.EnterpriseServices.DataAccess.Entities;
|
||||
using COA.EnterpriseServices.DataAccess.Helpers;
|
||||
using COA.EnterpriseServices.Creditor;
|
||||
using COA.EnterpriseServices.DataAccess;
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace COA.EnterpriseServices.Sandbox
|
||||
{
|
||||
@ -8,46 +9,14 @@ namespace COA.EnterpriseServices.Sandbox
|
||||
{
|
||||
private static void Main(string[] args)
|
||||
{
|
||||
ClientStuff();
|
||||
CreditorStuff();
|
||||
}
|
||||
var creditorController = Dependencies.Container.GetInstance<CreditorController>();
|
||||
|
||||
private static void CreditorStuff()
|
||||
{
|
||||
var creditorHelper = Dependencies.Container.GetInstance<CreditorHelper>();
|
||||
Console.WriteLine(creditorController.GetCreditorStatus(1));
|
||||
|
||||
// get single creditor
|
||||
var singleCreditor = creditorHelper.GetCreditor(1);
|
||||
Console.WriteLine(creditorController.SetCreditorStatus(1, "Active"));
|
||||
|
||||
// search creditors
|
||||
var searchedCreditors = creditorHelper.FindByName("Guy");
|
||||
|
||||
// search active creditors
|
||||
var activeCreditors = creditorHelper.FindByStatus("Active");
|
||||
|
||||
var newCreditor = new Creditor
|
||||
{
|
||||
ClientFirstName = "New",
|
||||
ClientLastName = "Guy",
|
||||
Status = "Active"
|
||||
};
|
||||
|
||||
creditorHelper.AddCreditor(newCreditor);
|
||||
}
|
||||
|
||||
private static void ClientStuff()
|
||||
{
|
||||
var clientHelper = Dependencies.Container.GetInstance<ClientHelper>();
|
||||
|
||||
var newClient = new Client
|
||||
{
|
||||
FirstName = "Ryan",
|
||||
LastName = "Peters",
|
||||
Email = "ryan@binarydad.com",
|
||||
Phone = 4102183673
|
||||
};
|
||||
|
||||
clientHelper.Add(newClient);
|
||||
Console.ReadLine();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user