# Csharp_restful
**Repository Path**: xv700/Csharp_restful
## Basic Information
- **Project Name**: Csharp_restful
- **Description**: asp.net关于webapi的项目研究
- **Primary Language**: C#
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2017-02-21
- **Last Updated**: 2020-12-19
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
20170222,本年度最2的日子
### 招募.net大神,一起构建一个c#版本的restful风格的接口
因为一些原因,你是否写了很多垃圾级别的代码,
加入我们吧!不为经济利益,只求心中对编程的热情,微信13752618744
1.[POST]create a new instance
2.[PUT]update attribute of a instance by id
3.[GET]count instances matched by filter
4.[GET]check whether a instance exist
5.[GET]find all instances matched by filter
6.[GET]find a instance by id
7.[DELETE]delete a instance by id
假设 一个表 hello结构如下
TABLE "hello" (
"title" TEXT,
"id" int
);
插入一条实例的方式为(前端以jq为例)
$.ajax({
"url": "/api/hello",
"cache": false,
"data": {
list:[{"title": "title","id":"10"}]
},
"type": "POST"
}).success(function (data, status, header) {
/*success body
服务端返回结构
{"state":"0",
list:[{
"id": "10",
"title": "title",
}]
}*/
}).fail(function (header, status, errorThrown) {
//fail body
服务器出现非200状态
})
需求很简单,给你一个表名,用http协议的JSON格式返回整个表的所有字段和数据,
当然需求不仅仅如此,后续我们会设计出很令人振奋的代码
谁有兴趣一起搞一下
具体说明在说明.docx文档里
