COA.EnterpriseServices/COA.EnterpriseServices.DataAccess.QuickBase/QuickBaseDataAccess.cs

42 lines
1009 B
C#
Raw Normal View History

using COA.PartnerApis.QuickBase;
using System;
2020-10-14 01:24:27 +00:00
using System.Collections.Generic;
using System.Linq.Expressions;
namespace COA.EnterpriseServices.DataAccess.QuickBase
{
2020-10-14 12:35:14 +00:00
public class QuickBaseDataAccess<T> : IDataAccess<T> where T : class, IRecord, new()
2020-10-14 01:24:27 +00:00
{
private readonly QuickBaseApiClient client;
public QuickBaseDataAccess(QuickBaseApiClient client)
{
this.client = client;
}
2020-10-14 01:24:27 +00:00
public bool Add(T item)
{
var fieldData = FieldMapRegistry.GetTableContext(item);
//client.AddRecord()
2020-10-14 12:35:14 +00:00
// use fieldData to create mapped data to push to quickbase API
2020-10-14 03:10:25 +00:00
return true;
2020-10-14 01:24:27 +00:00
}
public bool Update(T item)
{
2020-10-16 00:47:32 +00:00
var fieldData = FieldMapRegistry.GetTableContext(item);
return true;
}
2020-10-14 01:24:27 +00:00
public ICollection<T> Get(Expression<Func<T, bool>> query)
{
2020-10-14 12:35:14 +00:00
// we'll never get data from QB
return null;
}
2020-10-14 01:24:27 +00:00
}
}