Skip to content

ERPConnect.Linq.ERPDataContext

Namespace: ERPConnect.Linq
Assembly: ERPConnectStandard20.dll

Represents the main entry point for the LINQ to ERP framework.

public class ERPDataContext : IDisposable

Inheritance

objectERPDataContext

Implements

IDisposable

Inherited Members

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors

ERPDataContext()

Initializes a new instance of the ERPDataContext class.

public ERPDataContext()

ERPDataContext(string)

Initializes a new instance of the ERPDataContext class with a given connection string.

public ERPDataContext(string connectionString)

Parameters

connectionString string

The connection string.

ERPDataContext(string, ClientProtocol)

Initializes a new instance of the ERPDataContext class with a given connection string.

public ERPDataContext(string connectionString, ClientProtocol protocol)

Parameters

connectionString string

The connection string.

protocol ClientProtocol

Classical or Netweaver protocol.

ERPDataContext(string, int, string, string, string, string)

Initializes a new instance of the ERPDataContext class with given connection data values.

public ERPDataContext(string host, int system, string username, string password, string language, string client)

Parameters

host string

The host value.

system int

The system value.

username string

The username value.

password string

The password value.

language string

The language value.

client string

The client value.

ERPDataContext(string, int, string, string, string, string, ClientProtocol)

Initializes a new instance of the ERPDataContext class with given connection data values.

public ERPDataContext(string host, int system, string username, string password, string language, string client, ClientProtocol protocol)

Parameters

host string

The host value.

system int

The system value.

username string

The username value.

password string

The password value.

language string

The language value.

client string

The client value.

protocol ClientProtocol

Classical or Netweaver protocol.

Properties

AutoCloseConnection

Gets or sets a value indicating whether to auto-close the connection at disposal.

public bool AutoCloseConnection { get; set; }

Property Value

bool

Connection

Gets or sets the R3Connection used by this instance of the ERPDataContext.

public R3Connection Connection { get; set; }

Property Value

R3Connection

Log

Gets and sets the logger object.

public TextWriter Log { get; set; }

Property Value

TextWriter

Methods

CheckDispose()

Please refer to the Microsoft documentation as this is a non-ERPConnect method or property

protected void CheckDispose()

CommitWork()

Commits work by calling BAPI_TRANSACTION_COMMIT.

public bool CommitWork()

Returns

bool

Indicates the succes of processing the commit

CommitWork(bool)

Commits work by calling BAPI_TRANSACTION_COMMIT.

public bool CommitWork(bool wait)

Parameters

wait bool

Defines that method should wait

Returns

bool

Indicates the succes of processing the commit

Dispose()

Releases all resources used by the ERPDataContext.

public void Dispose()

Dispose(bool)

Please refer to the Microsoft documentation as this is a non-ERPConnect method or property

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

Please refer to the Microsoft documentation as this is a non-ERPConnect method or property

\~ERPDataContext()

Please refer to the Microsoft documentation as this is a non-ERPConnect method or property

protected ~ERPDataContext()

GetTable<TEntity>()

Returns a collection of objects of a particular type, where the type is defined by the TEntity parameter.

public ERPTable<TEntity> GetTable<TEntity>() where TEntity : class

Returns

ERPTable<TEntity>

A collection of objects.

Type Parameters

TEntity

RollbackWork()

Rollbacks work by calling BAPI_TRANSACTION_ROLLBACK.

public void RollbackWork()

Last update: January 4, 2024