add client. move common add/get helpers to Base helper

This commit is contained in:
2020-10-14 11:03:25 -04:00
parent 3a6ca75196
commit 2a03bc6bc8
13 changed files with 388 additions and 15 deletions

View File

@ -6,14 +6,20 @@ namespace COA.EnterpriseServices.Sandbox
internal class Program
{
private static void Main(string[] args)
{
ClientStuff();
//CreditorStuff();
}
private static void CreditorStuff()
{
var creditorHelper = new CreditorHelper();
// get single creditor
var singleCreditor = creditorHelper.GetCreditor(1);
var singleCreditor = creditorHelper.Get(1);
// search creditors
var searchedCreditors = creditorHelper.FindCreditorsByName("Guy");
var searchedCreditors = creditorHelper.FindByName("Guy");
// search active creditors
var activeCreditors = creditorHelper.FindByStatus("Active");
@ -25,9 +31,22 @@ namespace COA.EnterpriseServices.Sandbox
Status = "Active"
};
creditorHelper.AddCreditor(newCreditor);
creditorHelper.Add(newCreditor);
}
private static void ClientStuff()
{
var clientHelper = new ClientHelper();
var newClient = new Client
{
FirstName = "Ryan",
LastName = "Peters",
Email = "ryan@binarydad.com",
Phone = 4102183673
};
clientHelper.Add(newClient);
}
}
}