C# Class BExIS.Web.Shell.Areas.DIM.Controllers.DataController

This class is designed as a Web API to allow various client tools request datasets or a view on data sets and get the result in either of XML, JSON, or CSV formats. The design follows the RESTFull pattern mentioned in http://www.asp.net/web-api/overview/older-versions/creating-a-web-api-that-supports-crud-operations CSV formatter is implemented in the DataTupleCsvFormatter class in the Models folder. The formatter is registered in the WebApiConfig as an automatic formatter, so if the clinet sets the request's Mime type to text/csv, this formatter will be automatically engaged. text/xml and text/json return XML and JSON content accordingly.
Inheritance: ApiController
Show file Open project: BEXIS2/Core

Public Methods

Method Description
Delete ( int id ) : void

Deletes an existing dataset

Get ( int id ) : HttpResponseMessage

In addition to the id, it is possible to have projection and selection criteria passed to the action via query string parameters

The action accepts the following additional parameters via the query string 1: projection: is a comman separated list of ids that determines which variables of the dataset version tuples should take part in the result set 2: selection: is a logical expression that filters the tuples of the chosen dataset. The expression should have been written against the variables of the dataset only. logical operators, nesting, precedence, and SOME functions should be supported.

Get ( ) : IEnumerable
Post ( [ value ) : void

Create a new dataset!!!

Put ( int id, [ value ) : void

Updates an existing dataset

Method Details

Delete() public method

Deletes an existing dataset
public Delete ( int id ) : void
id int
return void

Get() public method

In addition to the id, it is possible to have projection and selection criteria passed to the action via query string parameters
The action accepts the following additional parameters via the query string 1: projection: is a comman separated list of ids that determines which variables of the dataset version tuples should take part in the result set 2: selection: is a logical expression that filters the tuples of the chosen dataset. The expression should have been written against the variables of the dataset only. logical operators, nesting, precedence, and SOME functions should be supported.
public Get ( int id ) : HttpResponseMessage
id int Dataset Id
return System.Net.Http.HttpResponseMessage

Get() public method

public Get ( ) : IEnumerable
return IEnumerable

Post() public method

Create a new dataset!!!
public Post ( [ value ) : void
value [
return void

Put() public method

Updates an existing dataset
public Put ( int id, [ value ) : void
id int
value [
return void