add client. move common add/get helpers to Base helper
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user