COA.EnterpriseServices/COA.EnterpriseServices.Sandbox/Program.cs

53 lines
1.3 KiB
C#
Raw Normal View History

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 16:43:46 +00:00
//ClientStuff();
CreditorStuff();
}
private static void CreditorStuff()
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
2020-10-14 16:23:04 +00:00
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.FindByName("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"
};
2020-10-14 16:23:04 +00:00
creditorHelper.AddCreditor(newCreditor);
2020-10-14 01:46:23 +00:00
}
2020-10-14 12:35:14 +00:00
private static void ClientStuff()
{
var clientHelper = new ClientHelper();
var newClient = new Client
{
FirstName = "Ryan",
LastName = "Peters",
Email = "ryan@binarydad.com",
Phone = 4102183673
};
2020-10-14 12:35:14 +00:00
clientHelper.Add(newClient);
}
2020-10-14 01:46:23 +00:00
}
}