2020-10-14 12:35:14 +00:00
|
|
|
|
using COA.EnterpriseServices.DataAccess.Entities;
|
|
|
|
|
using COA.EnterpriseServices.DataAccess.Helpers;
|
2020-10-14 01:46:23 +00:00
|
|
|
|
|
|
|
|
|
namespace COA.EnterpriseServices.Sandbox
|
|
|
|
|
{
|
2020-10-14 12:35:14 +00:00
|
|
|
|
internal class Program
|
2020-10-14 01:46:23 +00:00
|
|
|
|
{
|
2020-10-14 12:35:14 +00:00
|
|
|
|
private static void Main(string[] args)
|
2020-10-14 01:46:23 +00:00
|
|
|
|
{
|
2020-10-14 12:35:14 +00:00
|
|
|
|
var creditorHelper = new CreditorHelper();
|
2020-10-14 03:10:25 +00:00
|
|
|
|
|
2020-10-14 12:35:14 +00:00
|
|
|
|
// get single creditor
|
|
|
|
|
var singleCreditor = creditorHelper.GetCreditor(1);
|
2020-10-14 03:10:25 +00:00
|
|
|
|
|
2020-10-14 12:35:14 +00:00
|
|
|
|
// search creditors
|
|
|
|
|
var searchedCreditors = creditorHelper.FindCreditorsByName("Guy");
|
2020-10-14 03:10:25 +00:00
|
|
|
|
|
2020-10-14 12:35:14 +00:00
|
|
|
|
// search active creditors
|
|
|
|
|
var activeCreditors = creditorHelper.FindByStatus("Active");
|
2020-10-14 03:10:25 +00:00
|
|
|
|
|
2020-10-14 12:35:14 +00:00
|
|
|
|
var newCreditor = new Creditor
|
2020-10-14 03:10:25 +00:00
|
|
|
|
{
|
2020-10-14 12:35:14 +00:00
|
|
|
|
ClientFirstName = "New",
|
|
|
|
|
ClientLastName = "Guy",
|
|
|
|
|
Status = "Active"
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
creditorHelper.AddCreditor(newCreditor);
|
2020-10-14 01:46:23 +00:00
|
|
|
|
}
|
2020-10-14 12:35:14 +00:00
|
|
|
|
|
|
|
|
|
|
2020-10-14 01:46:23 +00:00
|
|
|
|
}
|
|
|
|
|
}
|