added controller stub. before changing idataaccess to abstract class

This commit is contained in:
2020-10-15 07:07:32 -04:00
parent 1cd994b074
commit ec52a8233a
10 changed files with 73 additions and 56 deletions

View File

@ -4,4 +4,8 @@
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\COA.EnterpriseServices.DataAccess\COA.EnterpriseServices.DataAccess.csproj" />
</ItemGroup>
</Project>

View File

@ -1,13 +0,0 @@
using System;
namespace COA.EnterpriseServices.Creditor
{
public class CreditorController
{
}
public class SettlementController
{
}
}

View File

@ -0,0 +1,27 @@
using COA.EnterpriseServices.DataAccess.Helpers;
using System;
namespace COA.EnterpriseServices.Creditor
{
public class CreditorController
{
private readonly CreditorHelper creditorHelper;
public CreditorController(CreditorHelper creditorHelper)
{
this.creditorHelper = creditorHelper;
}
public string GetCreditorStatus(int creditorId)
{
var creditor = creditorHelper.GetCreditor(creditorId);
return creditor.Status;
}
public bool SetCreditorStatus(int creditorId, string status)
{
return creditorHelper.SetCreditorStatus(creditorId, status);
}
}
}