当前位置: 首页 > news >正文

做网站开发电脑配置wordpress 优酷视频

做网站开发电脑配置,wordpress 优酷视频,php创建网页,网站优化联系1#xff0c;一般的访问方式。 1.1#xff0c;连接语句。 //sqlite 连接,支持相对位置#xff0c;也支持绝对位置 Data Source../../Database/cater.db// 连接数据库#xff0c;FailIfMissingfalse时若文件不存在会自动创建 string connStr DataSourcetest.db;Vers…1一般的访问方式。 1.1连接语句。 //sqlite 连接,支持相对位置也支持绝对位置 Data Source../../Database/cater.db// 连接数据库FailIfMissingfalse时若文件不存在会自动创建 string connStr DataSourcetest.db;Version3;Poolingtrue;FailIfMissingfalse;; 1.2配置文件设置。 //需在配置文件中进行如下配置否则报错 startup useLegacyV2RuntimeActivationPolicytrue supportedRuntime versionv4.0 sku.NETFramework,Versionv4.5.2 / /startup1.3常用语法。 //语法 select * from AlarmHistory insert into alarmhistory (AlarmDetails,starttime) values (abcgetdate()) //获取当前时间 select datetime(now) SELECT datetime(now, localtime); select CURRENT_TIMESTAMP//插入当前时间 insert into alarmhistory (alarmdetails,starttime) values(,datetime(now,localtime))//查找为null的数据 select * from alarmhistory where StartTime is null//修改表格序号update sqlite_sequence set seq 0 where name AlarmHistory//查询表格主键 select * from pragma_table_info (ActualData) where pk1//查询表格是否存在 select exists( select * from sqlite_master where typetable and nameActualData)//删除表格drop table ActualData //获取和设置时间时间格式只支持类似yyyy-MM-dd这样用-连接的格式若用/连接则无效 select datetime(2024-08-22 16:23:55) SELECT datetime(now, localtime); 1.4SQLite访问dll。 https://download.csdn.net/download/lingxiao16888/89914696 2基于EntityFramework的ORM数据访问。 2.1安装Nuget包 这部分比较简单直接Nuget包中下载即可 System.Data.SQLiteSystem.Data.SQLite.EF6System.Data.SQLite.LINQSQLite.CodeFirst 2.2配置文件需要进行如下修改。 ?xml version1.0 encodingutf-8? configurationconfigSections!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID237468 --section nameentityFramework typeSystem.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version6.0.0.0, Cultureneutral, PublicKeyTokenb77a5c561934e089 requirePermissionfalse //configSectionsstartupsupportedRuntime versionv4.0 sku.NETFramework,Versionv4.5.2 //startupentityFrameworkprovidersprovider invariantNameSystem.Data.SqlClient typeSystem.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer /provider invariantNameSystem.Data.SQLite typeSystem.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6 /provider invariantNameSystem.Data.SQLite.EF6 typeSystem.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6 //providers/entityFrameworksystem.dataDbProviderFactoriesremove invariantSystem.Data.SQLite.EF6 /add nameSQLite Data Provider (Entity Framework 6) invariantSystem.Data.SQLite.EF6 description.NET Framework Data Provider for SQLite (Entity Framework 6) typeSystem.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6 /remove invariantSystem.Data.SQLite /add nameSQLite Data Provider invariantSystem.Data.SQLite description.NET Framework Data Provider for SQLite typeSystem.Data.SQLite.SQLiteFactory, System.Data.SQLite //DbProviderFactories/system.data /configuration 2.3应用。 using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Data.Entity; using System.Data.SQLite; using System.Linq; using System.Text; using System.Threading.Tasks;namespace ConsoleApp2 {class Program{static void Main(string[] args){MyDbContext context new MyDbContext(cater.db);var set context.SetMemmberType();var ss set.FirstOrDefault();foreach (var item in set){Console.WriteLine(${item.MemTpName} ; {item.MemType} ; {item.MemTpDesc} ; {item.SubBy} ;{item.DelFlag});}Console.WriteLine(输出完成);Console.ReadKey();}}class MyDbContext : DbContext{public MyDbContext(string constr) : base(new SQLiteConnection{ConnectionString new SQLiteConnectionStringBuilder{DataSource constr,ForeignKeys true}.ConnectionString}, true){}//如果查询 MemmberType 表则该属性不能省略public virtual DbSetMemmberType MemmberType { get; set; }}[Table(MemmberType)]//该特性不能省略class MemmberType{[Key]//如果存在主键该特性不能省略[Column(MemType,TypeName INT)]public int MemType { get; set; }//[Column(MemTpName)]public string MemTpName { get; set; }[Column(MemTpDesc)]//可使用 Required 特性指定该列不能为空public string MemTpDesc { get; set; }//[Column(DelFlag)]public int DelFlag { get; set; }//[Column(SubBy)]public int SubBy { get; set; }} } 2.4效果。 数据库文件数据。 查询结果。
http://www.w-s-a.com/news/304118/

相关文章:

  • a5网站建设如果建设淘宝导购网站
  • html5响应式网站开发教程在国内做跨境电商怎么上外国网站
  • win7配置不能运行wordpress关键词快速优化排名软件
  • 餐饮公司最好的网站建设手机网站 搜索优化 百度
  • 17网站一起做网批做服装团购网站
  • 广州网站制作知名企业网站搭建品牌
  • 如何去除网站外链个人网页制作全过程
  • 保洁公司网站怎么做科技设计网站有哪些内容
  • 建设厅网站查询网页设计好就业吗
  • 惠东县网站建设wordpress 如何回到初始
  • 如何让公司网站网站转备案
  • 获得网站所有关键字北京网站建设116net
  • 铜陵电子商务网站建设做龙之向导网站有用吗
  • 购物网站制作费用沧州新华区
  • 信宜网站设计公司在线购物商城系统
  • 网站维护是什么样如何制作网站教程视频讲解
  • 网站建设网络推广代理公司wordpress图片防盗链
  • 网站备案关站沈阳男科医院哪家好点
  • 王者荣耀网站建设的步骤网站页面用什么软件做
  • 典型网站开发的流程房屋装修效果图三室一厅
  • 制作微网站多少钱阿里巴巴做网站的电话号码
  • 风铃建站模板安卓手机软件开发外包
  • 深圳市住房和建设局门户网站域名转移影响网站访问吗
  • 做母婴网站赚钱汕头百姓网
  • 那个网站建设好动漫制作技术升本可以升什么专业
  • 网站建设企业响应式网站模板广西建设部投诉网站
  • app营销的特点wordpress优化方案
  • 静安网站建设公司如何编辑wordpress
  • 做网站的职位叫什么问题常州金坛网站建设
  • 保健品网站模板用jsp做的网站前后端交互