摘要:
code only 和 code first的关系 !! code only 就是 code first !! 阅读全文
摘要:
枚举转化示例大全,数字或字符串转枚举,本文重点举例说明C#枚举的用法,数字转化为枚举、枚举转化为数字及其枚举数值的判断,以下是具体的示例:字符串转换成枚举:DayOfWeek week= (DayOfWeek)Enum.Parse(typeof(DayOfWeek), "Friday"); 数字转换成枚举:DayOfWeek week= (DayOfWeek)5; //Friday 具体的示例: 定义枚举: public enum DisplayType { All=10, Up=20, Down=30 } 1.数值转化 (1)字符转化为枚举 string str=&quo 阅读全文
摘要:
表名为:tableName 时间字段名为:theDate ===================== datePart函数日期部分缩写yearyy, yyyyquarterqq, qmonthmm, mdayofyeardy, ydaydd, dweekwk, wwweekdaydwHourhhminutemi, nsecondss, smillisecondms查询本月的记录 select * from tableName where DATEPART(mm, theDate) = DATEPART(mm, GETDATE()) and DATEPART(yy, theDate) = DAT 阅读全文