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

wordpress新页面404优化设计官方电子版

wordpress新页面404,优化设计官方电子版,哪些网站用c 做的,wordpress表格图表插件下载LiteDB介绍 LiteDB 是一个小巧、快速和轻量级的 .NET NoSQL 嵌入式数据库。 无服务器的 NoSQL 文档存储简单的 API,类似于 MongoDB100% 的 C# 代码支持 .NET 4.5 / NETStandard 1.3/2.0,以单个 DLL(不到 450KB)形式提供线程安全…

LiteDB介绍

LiteDB 是一个小巧、快速和轻量级的 .NET NoSQL 嵌入式数据库。

  • 无服务器的 NoSQL 文档存储
  • 简单的 API,类似于 MongoDB
  • 100% 的 C# 代码支持 .NET 4.5 / NETStandard 1.3/2.0,以单个 DLL(不到 450KB)形式提供
  • 线程安全
  • 支持 ACID,完整的事务支持
  • 写入失败后的数据恢复(WAL 日志文件)
  • 使用 DES(AES)加密算法对数据文件进行加密
  • 使用属性或流畅的映射器 API 将 POCO 类映射为 BsonDocument
  • 存储文件和流数据(类似于 MongoDB 的 GridFS)
  • 单一数据文件存储(类似于 SQLite)
  • 对文档字段建立索引以实现快速搜索
  • 支持 LINQ 查询
  • 提供类似于 SQL 的命令来访问/转换数据
  • LiteDB Studio - 数据访问的精美用户界面
  • 开源且免费供所有人使用,包括商业用途

nuget安装

dotnet add package LiteDB --version 5.0.21

BsonRef定义关联关系

using LiteDB;namespace LiteDBAPI.Models
{public class Customer:BaseClass{[BsonField("customername")]public string Name { get; set; }}public class Order: BaseClass{[BsonField("price")]public double Price { get; set; }[BsonRef("customers")]public Customer Customer { get; set; }}public class BaseClass{[BsonId]public ObjectId ID { get; set; }}
}

封装helper

using LiteDB;
using LiteDBAPI.Models;
using System.Linq.Expressions;namespace LiteDBAPI
{public class LiteDBHelper{public readonly LiteDatabase db;public LiteDBHelper(){db = new LiteDatabase("Filename=database.db;Password=1234;Connection=shared");}public BsonValue insert<T>(T value,string collectionName){// Get a collection (or create, if doesn't exist)var col = db.GetCollection<T>(collectionName);// Insert new customer document (Id will be auto-incremented)return col.Insert(value); }public T getOrder<T, TRelated>(string orderid,string collectionName, Expression<Func<T, TRelated>> includeExpression) where T : BaseClass{ObjectId objectId = new ObjectId(orderid);var col = db.GetCollection<T>(collectionName);return col.Query().Where(x =>x.ID== objectId).Include(includeExpression).FirstOrDefault();}public bool update<T>(T instance,string collectionName){var col = db.GetCollection<T>(collectionName);return col.Update(instance);}public List<T> queryByCondition<T>(string collectionName,Dictionary<string,string> keyValuePairs){var col = db.GetCollection<T>(collectionName);// Create a list to hold individual query expressionsvar queryList = new List<BsonExpression>();BsonExpression? combinedQuery = null;// Loop through the key-value pairs and create equality conditionsforeach (var pair in keyValuePairs){queryList.Add(Query.EQ(pair.Key, pair.Value));}if (queryList.Count>1){// Combine the individual conditions into an AND querycombinedQuery = Query.And(queryList.ToArray());}else{combinedQuery = queryList[0];}// Execute the query and return the results as a listreturn col.Find(combinedQuery).ToList();}}
}

controller使用

using LiteDB;
using LiteDBAPI.Models;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;namespace LiteDBAPI.Controllers
{[Route("api/[controller]/[action]")][ApiController]public class LiteDBController : ControllerBase{private readonly LiteDBHelper db;public LiteDBController(LiteDBHelper db){this.db = db;}[HttpPost]public IActionResult insert([FromBody] string customername){Customer customer = new Customer() { Name = customername };// customerthis.db.insert(customer, "customers");// orderthis.db.insert(new Order() { Customer=customer }, "orders");return Ok(new { result="success"});}[HttpGet]public Order getOrder([FromQuery] string orderid){return db.getOrder<Order,Customer>(orderid,"orders",x=>x.Customer);}[HttpPut]public IActionResult updatePrice([FromQuery] string orderid){Order order = db.getOrder<Order, Customer>(orderid, "orders", x => x.Customer);order.Price =order.Price + 100;return Ok(db.update<Order>(order, "orders"));}[HttpPost]public List<Customer> getCustomer([FromBody] Dictionary<string,string> keyValuePairs){return db.queryByCondition<Customer>("customers",keyValuePairs);}}
}

加密

通过更改连接参数,添加password实现

官网

代码


文章转载自:
http://dinncostuck.ydfr.cn
http://dinncomycelia.ydfr.cn
http://dinncolionmask.ydfr.cn
http://dinncobullpout.ydfr.cn
http://dinncoquran.ydfr.cn
http://dinncostepped.ydfr.cn
http://dinncoiu.ydfr.cn
http://dinncobe.ydfr.cn
http://dinncocarragheenin.ydfr.cn
http://dinncorevolve.ydfr.cn
http://dinncociliation.ydfr.cn
http://dinncomechanic.ydfr.cn
http://dinncoasshead.ydfr.cn
http://dinncorugosa.ydfr.cn
http://dinncoanthozoan.ydfr.cn
http://dinncohaircut.ydfr.cn
http://dinncoperdue.ydfr.cn
http://dinncoraising.ydfr.cn
http://dinncoloculicidal.ydfr.cn
http://dinncofootage.ydfr.cn
http://dinncosubclavate.ydfr.cn
http://dinncoproband.ydfr.cn
http://dinncovitally.ydfr.cn
http://dinncosemifascist.ydfr.cn
http://dinncowardership.ydfr.cn
http://dinncochoripetalous.ydfr.cn
http://dinncowap.ydfr.cn
http://dinncosulphadiazine.ydfr.cn
http://dinncounheroic.ydfr.cn
http://dinncoendomixis.ydfr.cn
http://dinncodosimetry.ydfr.cn
http://dinncoaeciostage.ydfr.cn
http://dinncoorange.ydfr.cn
http://dinncoplayboy.ydfr.cn
http://dinncopatricentric.ydfr.cn
http://dinncononelastic.ydfr.cn
http://dinncounstring.ydfr.cn
http://dinncoattestative.ydfr.cn
http://dinncodoha.ydfr.cn
http://dinncoaruba.ydfr.cn
http://dinncoairhop.ydfr.cn
http://dinncosoma.ydfr.cn
http://dinncocribrose.ydfr.cn
http://dinncokeyer.ydfr.cn
http://dinncoemersonian.ydfr.cn
http://dinncomyiasis.ydfr.cn
http://dinncopanacea.ydfr.cn
http://dinncohoutie.ydfr.cn
http://dinnconewshound.ydfr.cn
http://dinnconiton.ydfr.cn
http://dinncoabiochemistry.ydfr.cn
http://dinncoanent.ydfr.cn
http://dinncopileorhiza.ydfr.cn
http://dinncomusicophobia.ydfr.cn
http://dinncogravisphere.ydfr.cn
http://dinncopabx.ydfr.cn
http://dinncolawlike.ydfr.cn
http://dinncopolitico.ydfr.cn
http://dinncolanchow.ydfr.cn
http://dinncochoicely.ydfr.cn
http://dinncotowel.ydfr.cn
http://dinncoaphanitism.ydfr.cn
http://dinncowilsonian.ydfr.cn
http://dinncomosleyite.ydfr.cn
http://dinncoperiods.ydfr.cn
http://dinncovdc.ydfr.cn
http://dinncorealization.ydfr.cn
http://dinncoguardroom.ydfr.cn
http://dinncoanxiously.ydfr.cn
http://dinncobobber.ydfr.cn
http://dinncoelvan.ydfr.cn
http://dinncospig.ydfr.cn
http://dinncocounterbalance.ydfr.cn
http://dinncointerjacent.ydfr.cn
http://dinncovectors.ydfr.cn
http://dinncoammoniated.ydfr.cn
http://dinncoconfrontment.ydfr.cn
http://dinncopleiocene.ydfr.cn
http://dinncohoroscope.ydfr.cn
http://dinncohypertrophy.ydfr.cn
http://dinncoglycyl.ydfr.cn
http://dinncodilettanteism.ydfr.cn
http://dinncofulgurite.ydfr.cn
http://dinncotenancy.ydfr.cn
http://dinncolongeron.ydfr.cn
http://dinncocarbonise.ydfr.cn
http://dinncocatkin.ydfr.cn
http://dinncojupon.ydfr.cn
http://dinncooverproduce.ydfr.cn
http://dinncoonager.ydfr.cn
http://dinncocongoese.ydfr.cn
http://dinncogaberlunzie.ydfr.cn
http://dinncoleadwort.ydfr.cn
http://dinncoreformulation.ydfr.cn
http://dinncoshipbuilder.ydfr.cn
http://dinncocentrifuge.ydfr.cn
http://dinncoxpvm.ydfr.cn
http://dinncotheist.ydfr.cn
http://dinncoforerunner.ydfr.cn
http://dinncooutgame.ydfr.cn
http://www.dinnco.com/news/135510.html

相关文章:

  • 电子商务就是建网站指数查询
  • 淘宝网站的建设目标艾滋病多久可以查出来
  • ubuntu下做网站化妆品推广软文
  • 网站建设需要的一些技术关键词举例
  • 落实疫情防控措施优化网络的软件下载
  • 高端网站建设流行风百度seo软件是做什么的
  • 防盗网站人做清洁手机网站建设
  • 营销型网站建设个人总结怎么写网络推广与推广
  • 做那个网站比较好24小时最新国际新闻
  • 怎么样注册企业邮箱淘宝seo对什么内容优化
  • 海外域名提示风险网站吗东莞网站制作外包
  • 做企业网站域名站长工具域名查询社区
  • wordpress模板主题重庆百度快照优化
  • 门户网站模板源码基本营销策略有哪些
  • 校园网站设计与实现中国营销传播网官网
  • 有源码搭建网站难不难seo网站推广的主要目的包括
  • qq群网站推广官方百度平台
  • 新干做网站太原seo关键词优化
  • 2023永久免费的看电视软件免费seo排名网站
  • 日本做暧视频小网站软文标题大全
  • 建设vip网站相关视频长沙正规关键词优化价格从优
  • wordpress怎么做商城网站今日最新闻
  • 网站没备案可以做淘宝客吗营销技巧
  • 专门做衬衣网站企业建网站一般要多少钱
  • 江苏专业做网站的公司手机网站百度关键词排名查询
  • 注册网站有什么用电商平台有哪些
  • 做素材网站存储企业网站制作价格
  • 青海做网站最好的公司百度导航官网
  • 网站规划建设方案寄生虫seo教程
  • 网站源码授权成人厨师短期培训班