当前位置:网站首页>Nbear introduction and use diagram
Nbear introduction and use diagram
2022-07-04 03:23:00 【Brother Lei talks about programming】
NBear Introduction and use diagram
Frame type :ORM Mapping framework
brief introduction :NBear It's based on .Net 2.0、C#2.0 Open all source code software development framework class library .NBear The design goal of is to try our best to reduce the workload of developers , Maximize development efficiency , At the same time, both performance and scalability .
Demo edition : NBear 1.0.1.5 + MsSql 2005 + Vs 2010[net framework 3.5]
Download address :【①. Nbear download ②. Ben Demo download 】
Using diagrams
1. establish Demo database 、 surface
2. Create a new website and add NBear quote
New website ==> add to NBear quote NBear.Core.dll、NBear.Mapping.dll、NBearLite.dll(dll Position in download NBear Of dist\... Folder ) Right click the solution to add a new item ==> Name the new class library Com.uuu9.NBear Delete Class1, Add Com.uuu9.NBear Class library reference .
3. Generate entity class code , To configure web.config
The next step is to generate entity classes , The generator is in download NBear Of dist\... Folder , The name is :NBearLite.QueryColumnsGenerator.exe, Double-click on the run , Pictured :
The built-in code generator is very simple and convenient , If you can understand it, you don't need to read the following introduction , Are very basic introductions . stay Connection String Next, enter the connection string , choice SQL Server ==> Hook in Using SQL Server 2005( Database users can choose according to their own needs ), Click on Connect Button connection , If connected as , On the left Tables The table name will be displayed in the box , Select the... To generate People surface , Configure the language to be output Output Language by C#, Fill in the output namespace Output Namespace, Entity class name Root Class Name by People, Click on
Generate Code The generated code , And then click Save Output As Button select the storage path as this Demo Next , Then refresh the project , You can see and use the generated People Entity class .
web.config The configuration of is the same as that of a common project configuration connection string , stay ConnectionStrings Nodes are added underground <add name="NBearDB" connectionString="Data Source=192.168.1.150;Initial Catalog=NBearDB;uid=sa;password=sa;"/> Just connect the string , Other configurations will be fine by default . The connection string configured here name="NBearDB", wait NBear You need to use , There are no special requirements for naming here .
4.NBear Grammar use .
The grammar is as follows :
View Code
I don't like grammar very much , Let's make our own choices , thus NBear The simple use of has been completed .
Download address :【①. Nbear download ②. Ben Demo download 】
Follow the QR code below , Subscribe to more .
边栏推荐
- Examination question bank of constructor decoration direction post skills (constructor) and examination data of constructor decoration direction post skills (constructor) in 2022
- Keepalived set the master not to recapture the VIP after fault recovery (it is invalid to solve nopreempt)
- Cache general management class + cache httpcontext Current. Cache and httpruntime Differences between caches
- Bugku Zhi, you have to stop him
- Slurm view node configuration information
- Li Chuang EDA learning notes 13: electrical network for drawing schematic diagram
- The property of judging odd or even numbers about XOR.
- Pagoda SSL can't be accessed? 443 port occupied? resolvent
- Want to do something in production? Then try these redis commands
- How about the ratings of 2022 Spring Festival Gala in all provinces? Map analysis helps you show clearly!
猜你喜欢
This function has none of DETERMINISTIC, NO SQL..... (you *might* want to use the less safe log_bin_t
Pagoda SSL can't be accessed? 443 port occupied? resolvent
Teach you how to optimize SQL
The "message withdrawal" of a push message push, one click traceless message withdrawal makes the operation no longer difficult
What are the virtual machine software? What are their respective functions?
Node solves cross domain problems
How to use websocket to realize simple chat function in C #
Webhook triggers Jenkins for sonar detection
Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?
Database concept and installation
随机推荐
PTA tiantisai l1-079 tiantisai's kindness (20 points) detailed explanation
Stm32bug [the project references devices, files or libraries that are not installed appear in keilmdk]
3D game modeling is in full swing. Are you still confused about the future?
Love and self-discipline and strive to live a core life
Want to do something in production? Then try these redis commands
Jenkins configures IP address access
I stepped on a foundation pit today
Amélioration de l'efficacité de la requête 10 fois! 3 solutions d'optimisation pour résoudre le problème de pagination profonde MySQL
Code Execution Vulnerability - no alphanumeric rce create_ function()
7 * 24-hour business without interruption! Practice of applying multiple live landing in rookie villages
Résumé des outils communs et des points techniques de l'examen PMP
Development of digital collection trading platform development of digital collection platform
A brief talk on professional modeler: the prospect and professional development of 3D game modeling industry in China
AI 助力藝術設計抄襲檢索新突破!劉芳教授團隊論文被多媒體頂級會議ACM MM錄用
PMP 考試常見工具與技術點總結
Record a problem that soft deletion fails due to warehouse level error
Unspeakable Prometheus monitoring practice
Node solves cross domain problems
Site favorites
[Valentine's Day confession code] - Valentine's Day is approaching, and more than 10 romantic love effects are given to the one you love