# LiteDB-Wrapper
A simpler way to use [LiteDB](https://github.com/mbdavid/LiteDB)
![Azure DevOps builds](https://img.shields.io/azure-devops/build/norgelera/277d6eba-8304-42f5-8471-77737cf8ec7f/8.svg)
![Nuget](https://img.shields.io/nuget/dt/LiteDB.Wrapper)
![Nuget](https://img.shields.io/nuget/v/LiteDB.Wrapper)
![GitHub](https://img.shields.io/github/license/kuromukira/LiteDB.Wrapper)
[![CodeFactor](https://www.codefactor.io/repository/github/kuromukira/litedb.wrapper/badge)](https://www.codefactor.io/repository/github/kuromukira/litedb.wrapper)
# How-To
## [NuGet](https://www.nuget.org/packages/LiteDB.Wrapper/)
Add as reference
```c#
using LiteDB.Wrapper;
using LiteDB.Wrapper.Interface;
```
Create a collection reference
```c#
ICollectionRef<YourModel> reference = new CollectionReference<YourModel>("mydatabase.db", "my_collection");
```
Available methods
```c#
Insert(T)
Insert(IList<T>)
Update(T)
Update(IList<T>)
Remove(Guid)
Remove(IList<Guid>)
Commit()
Get(Guid)
GetPaged(PageOptions, SortOptions)
```
Here's an example usage
```c#
ICollectionRef<Model> reference = new CollectionReference<Model>(litedbloc, "insert_collection");
reference.Insert(new Model
{
_ID = Guid.NewGuid(),
Word = "Sample Word",
Number = 99
});
await reference.Commit();
```
You have to invoke ```Commit()``` at the end to save your changes to ```LiteDB```.
***Note*** : As per ``` LiteDB ``` specs, you must decorate your model classes with ```BsonField``` attributes.
# Contributors
- [kuromukira](https://www.twitter.com/norgelera)
Install the following to get started
**IDE**
1. [Visual Studio Code](https://code.visualstudio.com/)
2. [Visual Studio Community](https://visualstudio.microsoft.com/downloads/)
**Exntesions**
1. [C# Language Extension for VSCode](https://marketplace.visualstudio.com/items?itemName=ms-vscode.csharp)
**Frameworks**
1. [.NET](https://www.microsoft.com/net/download)
Do you want to contribute? Send me an email or DM me in [twitter](https://www.twitter.com/norgelera).
没有合适的资源?快使用搜索试试~ 我知道了~
LiteDB.Wrapper:使用LiteDB的更简单方法 数据库 - NoSQL.zip
共26个文件
cs:9个
yml:6个
md:3个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 1 下载量 181 浏览量
2023-10-26
11:48:31
上传
评论
收藏 35KB ZIP 举报
温馨提示
LiteDB.Wrapper:使用LiteDB的更简单方法 数据库 - NoSQL.zip
资源推荐
资源详情
资源评论
收起资源包目录
LiteDB.Wrapper:使用LiteDB的更简单方法 数据库 - NoSQL.zip (26个子文件)
L
T
A
LiteDB.Wrapper-master
LiteDB.Wrapper
LiteDB.Wrapper
wrapper
paged-return.cs 585B
collection-config.cs 729B
litedb-wrapper.cs 8KB
filter-options.cs 1KB
sort-options.cs 811B
page-options.cs 753B
LiteDB.Wrapper
LiteDB.Wrapper.xml 10KB
LICENSE.md 1KB
LiteDB.Wrapper.xml 5KB
LiteDB.Wrapper.csproj 1KB
IWrapper.cs 2KB
LiteDB.Wrapper.Test
LiteDB.Wrapper.Test.csproj 940B
wrapper-test.cs 6KB
wrapper-data.cs 2KB
LiteDB.Wrapper.sln 2KB
LICENSE.md 1KB
_config.yml 26B
.github
workflows
codeql-analysis.yml 2KB
FUNDING.yml 159B
.gitattributes 2KB
LICENSE 34KB
.devbots
lock-issue.yml 138B
lock-pull-request.yml 160B
azure-pipelines.yml 1KB
.gitignore 6KB
README.md 2KB
5
共 26 条
- 1
资源评论
- weixin_378427132023-12-30资源内容详细,总结地很全面,与描述的内容一致,对我启发很大,学习了。
N201871643
- 粉丝: 858
- 资源: 2293
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于Javascript和Python的微商城项目设计源码 - MicroMall
- 基于Java的网上订餐系统设计源码 - online ordering system
- 基于Javascript的超级美眉网络资源管理应用模块设计源码
- 基于Typescript和PHP的编程知识储备库设计源码 - study-php
- Screenshot_2024-05-28-11-40-58-177_com.tencent.mm.jpg
- 基于Dart的Flutter小提琴调音器APP设计源码 - violinhelper
- 基于JavaScript和CSS的随寻订购网页设计源码 - web-order
- 基于MATLAB的声纹识别系统设计源码 - VoiceprintRecognition
- 基于Java的微服务插件集合设计源码 - wsy-plugins
- 基于Vue和微信小程序的监理日志系统设计源码 - supervisionLog
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功