Hi BaileyK83,
As you are using Adapter TemplateSet you must to use **IFieldPersistenceInfo **class to access the information of a field. You can do that as follow:
- Craate a partial class for your DataAccessAdapter class and create a method that retrieves the field information:
using System;
using System.Collections;
using System.Data;
using System.Data.Common;
using SD.LLBLGen.Pro.ORMSupportClasses;
using SD.LLBLGen.Pro.DQE.SqlServer;
// here you should write <yourProjectNamespace>.DatabaseSpecific
namespace Northwind.DatabaseSpecific
{
public partial class DataAccessAdapter
{
public IFieldPersistenceInfo GetFieldInfo(IEntityField2 field)
{
return base.GetFieldPersistenceInfo(field);
}
}
}
- Use the above method at your BL or GUI code:
using (DataAccessAdapter adapter = new DataAccessAdapter())
{
// here put GetFieldInfo(<YourEntityName>Fields.<YourEntityField>)
IFieldPersistenceInfo fieldInfo = adapter.GetFieldInfo(CustomersFields.CustomerId);
Console.WriteLine("CustomerID IsIdentity = {0}", fieldInfo.IsIdentity);
}