摘要: 接下来先做角色这一板块的(增删改查),首先要新建一个Role控制器,在添加一个RoleList的视图。表格打算采用的是bootstrap的表格。using System;using System.Collections.Generic;using System.Linq;using System.W... 阅读全文
posted @ 2015-11-24 21:20 yjq_net 阅读(2969) 评论(0) 推荐(0) 编辑
摘要: 首先先加个区域,名为Adminusing System.Web.Mvc;namespace AuthorDesign.Web.Areas.Admin { public class AdminAreaRegistration : AreaRegistration { public ... 阅读全文
posted @ 2015-11-23 23:31 yjq_net 阅读(3864) 评论(3) 推荐(1) 编辑
摘要: 首先在webconfig中加入下面这句代码,这个主要是用来生成数据库的连接字符串View Code并且要修改一下这段代码 View Code将原先5.0.0改为6.0.0接下来,就是要生成数据库了。首先打开工具下的点击程序包管理器控制台。然后输入Enable-migration... 阅读全文
posted @ 2015-11-22 23:30 yjq_net 阅读(2902) 评论(4) 推荐(3) 编辑
摘要: 首先我们来写个类进行获取当前线程内唯一的DbContextusing System;using System.Collections.Generic;using System.Data.Entity;using System.Linq;using System.Runtime.Remoting.Me... 阅读全文
posted @ 2015-11-22 22:58 yjq_net 阅读(2944) 评论(8) 推荐(0) 编辑
摘要: 首先给上项目的整体框架图:,这里我没有使用BLL,因为感觉太烦了就没有去使用。那么接下来我们首先先去Model层中添加Model。管理员类:using System;using System.Collections.Generic;using System.ComponentModel.DataAn... 阅读全文
posted @ 2015-11-22 22:08 yjq_net 阅读(3826) 评论(8) 推荐(1) 编辑