Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rocherkong/coremessage
Easy Request/Response Message For Http.
https://github.com/rocherkong/coremessage
Last synced: 5 days ago
JSON representation
Easy Request/Response Message For Http.
- Host: GitHub
- URL: https://github.com/rocherkong/coremessage
- Owner: RocherKong
- Created: 2018-04-06T05:50:24.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-07-05T06:11:14.000Z (over 5 years ago)
- Last Synced: 2024-10-12T07:41:33.874Z (about 1 month ago)
- Language: C#
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: ReadMe.md
Awesome Lists containing this project
README
## CoreMessage
# Request
- RequestMessage
- GetByIdRequest
- GetByIdRequest<T>
- IdRequest
- IdRequest<T>
- NoneRequest
- QueryByPageRequest# Response
- ResponseMessage
- QueryResponse<TItem>
- QueryByPageResponse
- QueryByPageResponse<TItem>
- GetByIdResponse<T>
- ResponseMessageWrap<T>```c#
* Use Bara ORM
[HttpPost]
public ResponseMessageWrap> Query([FromBody]QueryRequest reqMsg)
{
var list = baraMapper.Query(new Bara.Core.Context.RequestContext
{
Request = reqMsg,
Scope = "B_Book",
SqlId = "QueryListByPage"
});var record = baraMapper.ExecuteScalar(new Bara.Core.Context.RequestContext
{
Request = reqMsg,
Scope = "B_Book",
SqlId = "GetRecord"
});return new ResponseMessageWrap>
{
Body = new GetByPageResponse
{
List = list,
TotalRecord = record
}
};
}
``````json
Request Parameters
{
"PageIndex": 0,
"PageSize": 0,
"Header": {
"Operator": 0,
"IP": "string"
}
}Response body
{
"IsSuccess": true,
"ErrorCode": "00000",
"Message": null,
"Body": {
"TotalRecord": 0,
"List": []
}
}```