上一页 1 ··· 4 5 6 7 8 9 下一页
  2014年1月10日
摘要: 表关系建立:http://blog.csdn.net/niewq/article/details/17232321一对多:namespace LckLib.EF.V6.Models{ public class Role { public int ID { get; set; } [MaxLength(20)] [Required] public string RoleName { get; set; } public string Remark { get; set; } public virtua... 阅读全文
posted @ 2014-01-10 10:46 顺风车 阅读(478) 评论(0) 推荐(0) 编辑
  2014年1月9日
摘要: http://www.cnblogs.com/haogj/archive/2012/02/17/2356537.html1.安装最新NuGet2.安装EntityFramework:在程序包管理器控制台中命令 Install-Package EntityFramework。安装的将是最新版本。本人是VS2010,只能安装上最新的EF6.X时才能正常使用Migration数据迁移功能。NuGet没找到办法安装老版本的EF5,如遇大神,请指点。项目中手动引用老版本的EF5[4.4.0.0],可以正常使用CodeFirst,但没办法在NuGet使用Migration功能。3.开启Migration功 阅读全文
posted @ 2014-01-09 11:01 顺风车 阅读(255) 评论(0) 推荐(0) 编辑
  2013年12月17日
摘要: 将多行数据拼接成一行:--wmsys.wm_concatselect wmsys.wm_concat(a.hdid) as test from flow_currentrecord a where a.flowid=222 group by a.flowid;但有大小限制:字符串缓冲区太小,超过varchar 4000长度。扩展:更改返回类型为clob--Type CREATE OR REPLACE TYPE zh_concat_im AUTHID CURRENT_USER AS OBJECT ( CURR_STR clob, STATIC FUNCTION ODCIAGGREGATE... 阅读全文
posted @ 2013-12-17 12:50 顺风车 阅读(930) 评论(0) 推荐(0) 编辑
  2013年12月10日
摘要: 1.存储过程使用out参数返回结果存储过程:create or replace procedure PROC_GETSEQ(tbname varchar,ReturnNum out number) is sql_statement varchar2(100);begin sql_statement :='select '||tbname||'_index.nextval from dual'; execute immediate sql_statement into ReturnNum ; end PROC_GETSEQ;EF模型中 添加-函数导入-返回类型集合 阅读全文
posted @ 2013-12-10 18:02 顺风车 阅读(573) 评论(0) 推荐(0) 编辑
  2013年12月6日
摘要: http://www.bootcss.com/ 阅读全文
posted @ 2013-12-06 14:32 顺风车 阅读(474) 评论(0) 推荐(0) 编辑
  2013年11月28日
摘要: 在Entity Framework中,从数据库生成模型,视图常报无主键。解决办法:为试图添加主键/复合主键create or replace view view_activebudgetamount (activeid,budgetactiveid,flowid,applyyear,activestage,budgettype,amount,constraint view_activebudgetamount_pk primary key (activeid,flowid) rely disable novalidate)as select a.activeid,a.activeid as b 阅读全文
posted @ 2013-11-28 15:35 顺风车 阅读(2893) 评论(0) 推荐(0) 编辑
  2013年11月27日
摘要: http://www.cnblogs.com/mszhangxuefei/archive/2012/05/15/mvcnotes_30.html使用默认的Model Binder(Using the Default Model Binder)尽管一个应用程序有多个binders,大多数都是依赖于内置的binder类——DefaultModelBinder。这也是当action调用者找不到自定义的binder时使用的binder。默认情况下,这个model binder搜索了4个路径,如下所示: Request.Form:HTML表单提供的值 RouteData.Values:使用应用程序路由获 阅读全文
posted @ 2013-11-27 17:40 顺风车 阅读(288) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/webabcd/archive/2010/05/27/1744899.html在MVC中Controller的action方法 常用的:可选参数和参数默认值 /* * 命名参数和可选参数 * 命名参数:调用方法时,可以不按位置传递参数,而是指定参数的命名来传值 * 可选参数:声明方法中的参数时,可以为其设置默认值,那么在调用该方法时,这种可选参数是可以忽略的 */using System;using System.Collections.Generic;using System.Linq;using System.Web;using System. 阅读全文
posted @ 2013-11-27 17:37 顺风车 阅读(200) 评论(0) 推荐(0) 编辑
  2013年11月21日
摘要: http://www.cnblogs.com/zhaozhan/archive/2011/06/08/2075767.htmlASPxScriptIntelliSense.js在安装目录下的Components\Sources\DevExpress.Web.ASPxScriptIntelliSense\ 阅读全文
posted @ 2013-11-21 10:28 顺风车 阅读(211) 评论(0) 推荐(0) 编辑
  2013年11月18日
摘要: http://www.cnblogs.com/cnmaxu/archive/2010/10/12/1848735.htmlhttp://www.cnblogs.com/artech/archive/2011/09/15/UnityDemo.htmlIOC主要用在如下两个方面1、同一个模块(或者子系统)中上层对下层的调用,使层与层尽量相互独立;2、模块(或者子系统)之间的相互调用,使模块之间尽量相互独立。 阅读全文
posted @ 2013-11-18 18:02 顺风车 阅读(182) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 下一页