上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 20 下一页
摘要: <!DOCTYPE html> <html lang="zh"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-e 阅读全文
posted @ 2020-01-14 15:25 liessay 阅读(3144) 评论(0) 推荐(0) 编辑
摘要: 拼接sql语句会造成sql注入,注入演示 namespace WindowsFormsApp1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_C 阅读全文
posted @ 2019-12-11 09:05 liessay 阅读(755) 评论(0) 推荐(0) 编辑
摘要: Form2 Form1 效果 阅读全文
posted @ 2019-12-10 08:35 liessay 阅读(230) 评论(0) 推荐(1) 编辑
摘要: View Controller 阅读全文
posted @ 2019-11-29 14:40 liessay 阅读(207) 评论(0) 推荐(0) 编辑
摘要: 单条记录添加 第一种方式: public void AddRegion() { using(Northwind db = new Northwind()) { Region region = new Region(); region.RegionID = 5; region.RegionDescri 阅读全文
posted @ 2019-11-28 12:59 liessay 阅读(1428) 评论(0) 推荐(0) 编辑
摘要: 右击项目——添加——新建项——数据(C#)——选择ADO.NET实体数据模型——点击添加——然后根据实体数据模型向导来一步步的做。 用到的表 1 using System; 2 using System.Data; 3 using System.Linq; 4 using System.Window 阅读全文
posted @ 2019-11-27 15:22 liessay 阅读(443) 评论(0) 推荐(0) 编辑
摘要: _Layout.cshtml 1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 <meta charset="utf-8" /> 阅读全文
posted @ 2019-11-26 13:30 liessay 阅读(253) 评论(0) 推荐(0) 编辑
摘要: System.ComponentModel.DataAnnotations 命名空间 System.ComponentModel.DataAnnotations 命名空间提供定义 ASP.NET MVC 和 ASP.NET 数据控件的类的特性。 类 AssociatedMetadataTypeTyp 阅读全文
posted @ 2019-11-25 14:49 liessay 阅读(576) 评论(0) 推荐(1) 编辑
摘要: 新建实体数据模型 选择ADO.NET实体数据模型,名称改为数据库名 因为使用现有数据库,所以选择来自数据库的EF设计器,只演示所以只选择一个表,空模型可后期增加表 选择从数据库更新模型 新建数据库连接 选择EF6.X框架 选择要查询数据的表 选择后的实体数据库设计视图 引用异步、EF、数据模型命名空 阅读全文
posted @ 2019-11-25 14:05 liessay 阅读(1662) 评论(0) 推荐(0) 编辑
摘要: Model添加类 Customers 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Web; 5 6 namespace WebApplication2.Models 7 阅读全文
posted @ 2019-11-25 13:49 liessay 阅读(429) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 20 下一页