Almost forgot,
I have started generation of the context class, or data objects.
Replace your DynamicsAXContext class with this one. You will need to use this for the AxaptaRecord binder to work, as we have moved on to getters and setters (properties not fields). As you can see, I bundled up my data in the context, to support the generation of code. You will need to delete your ADDRESSSTATE class, so it doesn't cause busts. If you have questions, just email them. I have had tons already lol.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using System.Data.Linq.Mapping;
using System.IO;
using System.Linq;
using System.Reflection;
using System.ComponentModel;
namespace LinqToAX
{
public class DynamicsAXContext
{
public Query<ADDRESSSTATE> ADDRESSSTATES;
public DynamicsAXContext(DAXDataAccessLayer connection)
{
QueryProvider provider = new DAXQueryProvider(connection);
this.ADDRESSSTATES = new Query<ADDRESSSTATE>(provider);
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name = "dbo.ADDRESSSTATE")]
public class ADDRESSSTATE : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private string _NAME;
private string _STATEID;
private string _COUNTRYREGIONID;
private string _DATAAREAID;
private long _RECID;
private int _RECVERSION;
private int _TIMEZONE;
private System.DateTime _MODIFIEDDATETIME;
#region Extensibility Method Definitions
#endregion
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage = "_NAME", DbType = "NVarChar(32) NOT NULL", CanBeNull = false)]
public string NAME
{
get
{
return this._NAME;
}
set
{
if ((this._NAME != value))
{
// this.OnNAMEChanging(value);
this.SendPropertyChanging();
this._NAME = value;
this.SendPropertyChanged("NAME");
// this.OnNAMEChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage = "_STATEID", DbType = "NVarChar(15) NOT NULL", CanBeNull = false, IsPrimaryKey = true)]
public string STATEID
{
get
{
return this._STATEID;
}
set
{
if ((this._STATEID != value))
{
// this.OnSTATEIDChanging(value);
this.SendPropertyChanging();
this._STATEID = value;
this.SendPropertyChanged("STATEID");
// this.OnSTATEIDChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage = "_COUNTRYREGIONID", DbType = "NVarChar(15) NOT NULL", CanBeNull = false, IsPrimaryKey = true)]
public string COUNTRYREGIONID
{
get
{
return this._COUNTRYREGIONID;
}
set
{
if ((this._COUNTRYREGIONID != value))
{
//this.OnCOUNTRYREGIONIDChanging(value);
this.SendPropertyChanging();
this._COUNTRYREGIONID = value;
this.SendPropertyChanged("COUNTRYREGIONID");
//this.OnCOUNTRYREGIONIDChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage = "_DATAAREAID", DbType = "NVarChar(4) NOT NULL", CanBeNull = false, IsPrimaryKey = true)]
public string DATAAREAID
{
get
{
return this._DATAAREAID;
}
set
{
if ((this._DATAAREAID != value))
{
//this.OnDATAAREAIDChanging(value);
this.SendPropertyChanging();
this._DATAAREAID = value;
this.SendPropertyChanged("DATAAREAID");
//this.OnDATAAREAIDChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage = "_RECID", DbType = "BigInt NOT NULL")]
public long RECID
{
get
{
return this._RECID;
}
set
{
if ((this._RECID != value))
{
//this.OnRECIDChanging(value);
this.SendPropertyChanging();
this._RECID = value;
this.SendPropertyChanged("RECID");
//this.OnRECIDChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage = "_RECVERSION", DbType = "Int NOT NULL")]
public int RECVERSION
{
get
{
return this._RECVERSION;
}
set
{
if ((this._RECVERSION != value))
{
//this.OnRECVERSIONChanging(value);
this.SendPropertyChanging();
this._RECVERSION = value;
this.SendPropertyChanged("RECVERSION");
//this.OnRECVERSIONChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage = "_TIMEZONE", DbType = "Int NOT NULL")]
public int TIMEZONE
{
get
{
return this._TIMEZONE;
}
set
{
if ((this._TIMEZONE != value))
{
//this.OnTIMEZONEChanging(value);
this.SendPropertyChanging();
this._TIMEZONE = value;
this.SendPropertyChanged("TIMEZONE");
//this.OnTIMEZONEChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage = "_MODIFIEDDATETIME", DbType = "DateTime NOT NULL")]
public System.DateTime MODIFIEDDATETIME
{
get
{
return this._MODIFIEDDATETIME;
}
set
{
if ((this._MODIFIEDDATETIME != value))
{
//this.OnMODIFIEDDATETIMEChanging(value);
this.SendPropertyChanging();
this._MODIFIEDDATETIME = value;
this.SendPropertyChanged("MODIFIEDDATETIME");
//this.OnMODIFIEDDATETIMEChanged();
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
}
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment