摘要: API代码: //分页显示商品 [HttpGet] public PageDate GetGoods(int index, int size) { PageDate page = new PageDate(); var list = db.Goods.ToList(); var count = li 阅读全文
posted @ 2020-08-06 22:11 A_菜鸟 阅读(205) 评论(0) 推荐(0)
摘要: //添加商品 [HttpPost] public int AddGood(Goods goods) { using (SqlConnection conn = new SqlConnection(connstr)) { return conn.Execute("insert into Goods v 阅读全文
posted @ 2020-08-06 21:59 A_菜鸟 阅读(239) 评论(0) 推荐(0)
摘要: 写法一: --简单的分页存储过程create proc Proc_Show(@currentPage int,@pageSize int,@totalCount int out)asbegin declare @sql1 nvarchar(max),@sqlCount nvarchar(max) s 阅读全文
posted @ 2020-08-06 19:30 A_菜鸟 阅读(200) 评论(0) 推荐(0)
摘要: 使用ASP.NET MVC实现简单的文件上传: 视图代码(View): <form action='@Url.Action("Upload","File")' method="post" enctype="multipart/form-data"> <input name="file" type=" 阅读全文
posted @ 2020-07-22 16:54 A_菜鸟 阅读(220) 评论(0) 推荐(0)