MixERP.Net.Api.Core.EntityController Class Reference

Provides a direct HTTP access to perform various tasks such as adding, editing, and removing Entities. More...

Inheritance diagram for MixERP.Net.Api.Core.EntityController:

Public Member Functions

EntityView GetEntityView ()
 Creates meta information of "entity" entity. More...
 
long Count ()
 Counts the number of entities. More...
 
IEnumerable< MixERP.Net.Entities.Core.EntityGet ()
 Returns collection of entity for export. More...
 
MixERP.Net.Entities.Core.Entity Get (int entityId)
 Returns an instance of entity. More...
 
IEnumerable< MixERP.Net.Entities.Core.EntityGet ([FromUri] int[] entityIds)
 
IEnumerable< MixERP.Net.Entities.Core.EntityGetPagedResult ()
 Creates a paginated collection containing 25 entities on each page, sorted by the property EntityId. More...
 
IEnumerable< MixERP.Net.Entities.Core.EntityGetPagedResult (long pageNumber)
 Creates a paginated collection containing 25 entities on each page, sorted by the property EntityId. More...
 
long CountWhere ([FromBody]dynamic filters)
 Counts the number of entities using the supplied filter(s). More...
 
IEnumerable< MixERP.Net.Entities.Core.EntityGetWhere (long pageNumber, [FromBody]dynamic filters)
 Creates a filtered and paginated collection containing 25 entities on each page, sorted by the property EntityId. More...
 
long CountFiltered (string filterName)
 Counts the number of entities using the supplied filter name. More...
 
IEnumerable< MixERP.Net.Entities.Core.EntityGetFiltered (long pageNumber, string filterName)
 Creates a filtered and paginated collection containing 25 entities on each page, sorted by the property EntityId. More...
 
IEnumerable< DisplayFieldGetDisplayFields ()
 Displayfield is a lightweight key/value collection of entities. More...
 
IEnumerable< PetaPoco.CustomFieldGetCustomFields ()
 A custom field is a user defined field for entities. More...
 
IEnumerable< PetaPoco.CustomFieldGetCustomFields (string resourceId)
 A custom field is a user defined field for entities. More...
 
void AddOrEdit ([FromBody]Newtonsoft.Json.Linq.JArray form)
 Adds or edits your instance of Entity class. More...
 
void Add (MixERP.Net.Entities.Core.Entity entity)
 Adds your instance of Entity class. More...
 
void Edit (int entityId, [FromBody] MixERP.Net.Entities.Core.Entity entity)
 Edits existing record with your instance of Entity class. More...
 
List< object > BulkImport ([FromBody]dynamic collection)
 Adds or edits multiple instances of Entity class. More...
 
void Delete (int entityId)
 Deletes an existing instance of Entity class via EntityId. More...
 

Properties

long LoginId [get]
 
int UserId [get]
 
int OfficeId [get]
 
string Catalog [get]
 

Detailed Description

Provides a direct HTTP access to perform various tasks such as adding, editing, and removing Entities.

Member Function Documentation

void MixERP.Net.Api.Core.EntityController.Add ( MixERP.Net.Entities.Core.Entity  entity)

Adds your instance of Entity class.

Parameters
entityYour instance of entities class to add.
void MixERP.Net.Api.Core.EntityController.AddOrEdit ( [FromBody] Newtonsoft.Json.Linq.JArray  form)

Adds or edits your instance of Entity class.

Parameters
entityYour instance of entities class to add or edit.
List<object> MixERP.Net.Api.Core.EntityController.BulkImport ( [FromBody] dynamic  collection)

Adds or edits multiple instances of Entity class.

Parameters
collectionYour collection of Entity class to bulk import.
Returns
Returns list of imported entityIds.
Exceptions
MixERPExceptionThrown when your any Entity class in the collection is invalid or malformed.
long MixERP.Net.Api.Core.EntityController.Count ( )

Counts the number of entities.

Returns
Returns the count of the entities.
long MixERP.Net.Api.Core.EntityController.CountFiltered ( string  filterName)

Counts the number of entities using the supplied filter name.

Parameters
filterNameThe named filter.
Returns
Returns the count of filtered entities.
long MixERP.Net.Api.Core.EntityController.CountWhere ( [FromBody] dynamic  filters)

Counts the number of entities using the supplied filter(s).

Parameters
filtersThe list of filter conditions.
Returns
Returns the count of filtered entities.
void MixERP.Net.Api.Core.EntityController.Delete ( int  entityId)

Deletes an existing instance of Entity class via EntityId.

Parameters
entityIdEnter the value for EntityId in order to find and delete the existing record.
void MixERP.Net.Api.Core.EntityController.Edit ( int  entityId,
[FromBody] MixERP.Net.Entities.Core.Entity  entity 
)

Edits existing record with your instance of Entity class.

Parameters
entityYour instance of Entity class to edit.
entityIdEnter the value for EntityId in order to find and edit the existing record.
IEnumerable<MixERP.Net.Entities.Core.Entity> MixERP.Net.Api.Core.EntityController.Get ( )

Returns collection of entity for export.

Returns
MixERP.Net.Entities.Core.Entity MixERP.Net.Api.Core.EntityController.Get ( int  entityId)

Returns an instance of entity.

Parameters
entityIdEnter EntityId to search for.
Returns
IEnumerable<PetaPoco.CustomField> MixERP.Net.Api.Core.EntityController.GetCustomFields ( )

A custom field is a user defined field for entities.

Returns
Returns an enumerable custom field collection of entities.
IEnumerable<PetaPoco.CustomField> MixERP.Net.Api.Core.EntityController.GetCustomFields ( string  resourceId)

A custom field is a user defined field for entities.

Returns
Returns an enumerable custom field collection of entities.
IEnumerable<DisplayField> MixERP.Net.Api.Core.EntityController.GetDisplayFields ( )

Displayfield is a lightweight key/value collection of entities.

Returns
Returns an enumerable key/value collection of entities.
EntityView MixERP.Net.Api.Core.EntityController.GetEntityView ( )

Creates meta information of "entity" entity.

Returns
Returns the "entity" meta information to perform CRUD operation.
IEnumerable<MixERP.Net.Entities.Core.Entity> MixERP.Net.Api.Core.EntityController.GetFiltered ( long  pageNumber,
string  filterName 
)

Creates a filtered and paginated collection containing 25 entities on each page, sorted by the property EntityId.

Parameters
pageNumberEnter the page number to produce the resultset.
filterNameThe named filter.
Returns
Returns the requested page from the collection using the supplied filters.
IEnumerable<MixERP.Net.Entities.Core.Entity> MixERP.Net.Api.Core.EntityController.GetPagedResult ( )

Creates a paginated collection containing 25 entities on each page, sorted by the property EntityId.

Returns
Returns the first page from the collection.
IEnumerable<MixERP.Net.Entities.Core.Entity> MixERP.Net.Api.Core.EntityController.GetPagedResult ( long  pageNumber)

Creates a paginated collection containing 25 entities on each page, sorted by the property EntityId.

Parameters
pageNumberEnter the page number to produce the resultset.
Returns
Returns the requested page from the collection.
IEnumerable<MixERP.Net.Entities.Core.Entity> MixERP.Net.Api.Core.EntityController.GetWhere ( long  pageNumber,
[FromBody] dynamic  filters 
)

Creates a filtered and paginated collection containing 25 entities on each page, sorted by the property EntityId.

Parameters
pageNumberEnter the page number to produce the resultset.
filtersThe list of filter conditions.
Returns
Returns the requested page from the collection using the supplied filters.

The documentation for this class was generated from the following file: