ClearOneDalDemo/SettlementAttempt/QuickBaseSettlementAttemptDataAccess.cs

26 lines
874 B
C#
Raw Normal View History

2020-09-15 22:10:53 +00:00
using BinaryDad.AggregateDal.Models;
using System;
namespace BinaryDad.AggregateDal
{
public class QuickBaseSettlementAttemptDataAccess : ISettlementAttemptDataAccess
{
public bool AddAttempt(SettlementAttempt attempt)
{
2020-09-15 22:53:28 +00:00
// 1. create attempt in QuickBase ("Id" SQL PK should already be populated)
// 2. update the "RecordId" property/PK of attempt upon insertion
// 3. return if operation is successful
2020-09-15 22:10:53 +00:00
2020-09-15 22:53:28 +00:00
// auto-generated value from QB record insert
attempt.RecordId = 9999;
2020-09-15 22:10:53 +00:00
Console.WriteLine($"Adding attempt ID {attempt.RecordId} to Quickbase with SQL ID {attempt.Id}");
return true;
}
2020-09-15 22:53:28 +00:00
// NOTE: we have no need to retrieve a record from QB, as it will come from SQL
public SettlementAttempt GetAttempt(int recordId) => null;
2020-09-15 22:10:53 +00:00
}
}