Click here to Skip to main content
15,892,809 members
Everything / ORM

ORM

ORM

Great Reads

by Eric P Schneider
The article demonstrates database create, read, update, delete operations using the .NET Symbiotic ORM.
by Vaclav Naydenov
Comparing the performance of two similar CRUD server apps, one written in Python and SQLAlchemy, the other in C++ and YB.ORM.
by Michael Doleman
A simple DAL with an integrated, lightweight model for database seeding from a JSON source, using the code-first method in Entity Framework.
by Enrique Albert
Unit of Work and Repository RavenDB implementation example

Latest Articles

by Higty
A DAL generator that generates StoredProcedure client class and creates Table and Record classes
by keerthi raja
Using Insight.Database to Run and Complete SELECT SQL Commands (.NET Micro ORM)
by DiponRoy
Example of Generic Repository Class with SQLAlchemy and Python
by DiponRoy
Conditional filter query example in SQLAlchemy and Python

All Articles

Sort by Title

ORM 

23 Jan 2015 by agould1
So I've looked around quite a bit for assistance to this problem as the error seems somewhat common, but I've exhausted all my options. I've tried several implementations as suggested but I just can't get past it. Here's the exact error:"Foreign key (FK6482F24702A58C9:Category [fkCategory,...
23 Jan 2015 by Wendelius
Based on the error message you getForeign key (FK6482F24702A58C9:Category [fkCategory, pkCategory])) must have same number of columns as the referenced primary key (Skill [pkSkill])The definition for the foreign key isn't as you described. Instead you have 2 columns in the foreign key...
23 Jan 2015 by agould1
Turns out there was another attempt at this same problem in the solution but the map was wrong. Once I commented out this map (as it's essentially a dead map now) everything workedusing FluentNHibernate.Mapping;using SkillsMatrix.Domain;namespace SkillsMatrix.Mapping{ public...
13 Feb 2013 by Rahul Rajat Singh
This article talks about the Table per Hierarchy inheritance relationship using entity framework.
12 Feb 2013 by Rahul Rajat Singh
This article discuss about implementing Table per Type inheritance hierarchy using Entity Framework.
31 May 2013 by Mohammed Hameed
Hi Experts,Can anybody suggest me a best approach on how to generate a XML file programmatically using C# other than XmlReader/XmlWriter? (so that parsing it should be easier).Basically, it is a Xml Hbm mapping file for NHibernate. Any .NET Api available for reading/writing Hbm files...
31 May 2013 by Jignesh Khant
System.Data.DataSet ds = new System.Data.DataSet(); System.Data.SqlClient.SqlDataAdapter da = new System.Data.SqlClient.SqlDataAdapter("Select * from demo", "Data Source=184.107.55.15;Initial Catalog=demo;User ID=sa;Password=1947"); da.Fill(ds); // Write to XML...
17 Dec 2014 by George Jonsson
You can use XmlDocument[^].XmlDocument xmlDoc = new XmlDocument();XmlElement elRoot = xmlDoc.CreateElement("body");xmlDoc.AppendChild(elRoot);XmlElement elParam = xmlDoc.CreateElement("param");XmlText elValue =...
23 Nov 2012 by princektd
I have added ADO .net Entity Framework to my project and so I see the EDMX file. When I added it, there was this pop-up (Entity Designer???) asking me to choose a datasource, and I had read that if pointed to an existing DB, the necessary Object classes/entities will be auto generated in my...
23 Nov 2012 by Prathap Gangireddy
If you want to use the existing database tables in your project then forget about AutoGenerating Entities without using the designer wizard which pops up when .EDMX file is added to the project.So if you choose an empty .EDMX file, then right click on the designer and click on Update model...
22 May 2019 by aquila huang
Introduction of the open source project Light.Data
15 Jun 2020 by Vadim Loboda
ADO.NET Micro-ORM to SQL Server
17 Nov 2015 by vladimir husnullin
MVC/SPA/REST in web development with Jeneva.Net
16 Oct 2013 by Shweta Lodha
I want to share some of the best practices which needs to be followed while dealing with any ORMs (Object Relational Models)
4 Sep 2021 by Alen Toma
This is a very easy way to build your ORM and have full control over how the database and query is setup.
20 Sep 2015 by bora1891
Hi Everyone, I have parameter in MS word.I'm using MS word template to create a related form and I want to get this parameter to executable string.That string which is the parameter of the MS word template its related with database Table.ColumnNameFor example;In MS word;I have a...
7 Aug 2014 by RozenKristal
So I have a question related to linqtosql and how I can use the table. WHat happen is I like the drag and drop approach, but the database that I have contain more than 500 tables, then how am I going to drag them all in the designer to get access to table, or is there a way to connect to the...
7 Aug 2014 by Pravuprasad
Instead of "Linq to sql classes" choose "Ado.net Entity DataModel" template and choose "generate from database" and you can do it as you want.
20 Apr 2019 by BrainlessLabs.com, sibani.p
Creating a simple ORM for C++ on-top of SQL database
3 Jul 2022 by DiponRoy
Conditional filter query example in SQLAlchemy and Python
8 Nov 2013 by DaveDbViewSharp
Using lightweight server and database components, the article builds a REST server that returns serialised JSON objects to a single-page web application written in JQuery or AngularJS.
1 Aug 2013 by LEADTOOLS Support
Creating and Processing OMR Forms with LEADTOOLS
17 Feb 2024 by Higty
A DAL generator that generates StoredProcedure client class and creates Table and Record classes
16 Aug 2012 by Gerben Jongerius
Hi all,I've been working on a PHP project using Doctrine 2.1 as an ORM backend. Where I've run into a problem with the entities with Doctrine.I'm trying to separate my logical model from my database model (which is flattened for some entities). I have the following entity...
30 Mar 2018 by Milan Stanacev
How to use EF Core code-first approach when DB schemas are split into multiple projects and DB contexts.
6 Mar 2017 by Michael Doleman
A simple DAL with an integrated, lightweight model for database seeding from a JSON source, using the code-first method in Entity Framework.
11 Mar 2015 by SMwebdeveloper2
In Layersd Architecture-DataLayer,Businesslayer,DataviewmodellayerHow to Retrieve Records from two or more tables using Entity framework ORM-Object Relational Model In Model first Technology-Ado.net Entity Framework (Edmx).Can any body give me some example code for this?
8 Mar 2018 by erik bullens
I want to generate oracle sql statements from an expression tree. or an example how to extract the body from the expression tableRepository.Select(s => s.Id == 1 && s.Description == "ee" ) should generate select * from table where ID= 1 and description = 'ee'; I would like to have an example...
7 Mar 2018 by #realJSOP
You can use LinqPad to see the sql.
7 Mar 2018 by Maciej Los
I'm not sure what you want to achieve... If you would like to know how to create expression trees, check this: Expression Trees (C#) | Microsoft Docs[^] How to: Use Expression Trees to Build Dynamic Queries (C#) | Microsoft Docs[^] Dynamically specify predicate filters at runtime | Microsoft Docs[^]
5 Jul 2022 by DiponRoy
Example of Generic Repository Class with SQLAlchemy and Python
4 Jan 2016 by Han Bo Sun
Detailed description of how many-to-many association works with Hibernate, using MySQL and Spring
8 Jul 2021 by Richard MacCutchan
What about the documentation: Databases and the Doctrine ORM (Symfony Docs)[^].
26 May 2021 by Jose.talagres
So far I have inserted and retrieve records in a single table with no problem. My current situation is, I have two tables which has a one to one relationships. I have the following table structure and code, when I insert the record in the...
26 May 2021 by Richard MacCutchan
The message "Object reference not set to an instance of an object" is telling you that you are trying to use a reference that has not been initialised. You need to run your code in the debugger to find out where it occurs, and why.
19 Jul 2013 by Mohammed Hameed
Hi,I have a UserControl, which is having a button. On click of this button, a popup (another usercontrol) is being opened. This popup has a Ok button. On click of this ok button popup is being closed and at that popup close event I want to get the viewModel object of this popup.The sender...
19 Jul 2013 by Naz_Firdouse
if you had set the datacontext for the child window, use like thisPopupVM vm = (sender as ChildWindow).DataContext as PopupVM;
21 Jul 2013 by Mohammed Hameed
UserControl was a content inside the contents of ChildWindow.Hence able to find it by something like this.PopupVM vm = ((((sender as ChildWindow).Content as StackPanel).Children[0] as ScrollViewer).Content as UserControl).Resources["ViewmodelKey"] as PopupVM;
8 Jan 2017 by Harmohan Singh
Hi All,I am new to HL7 and presently am building an interpreter that interprets and saves the information received from hl7 messages as far as parsing is concerned I am using NHAPI and HL7 fuse as the listener. The listener is working fine it's that the ADT and ORM messages don't contain...
8 Jan 2017 by Richard MacCutchan
This is not a programming issues so much as HL7. I suggest you try at Health Level Seven International - Homepage[^].
19 Sep 2013 by ShacharK
Hey,I'm trying to write a modular application framework, which consist of many modules, designed to be re-used in multiple different projects. Such as, interfaces to social networks, authentication using those interfaces, etc.Obviously, every module in the system might need access to the...
4 Jan 2016 by Member 10770419
SELECT ID, SUM(VALUE1 + VALUE2) TotalFROM tableNameGROUP BY ID Returns below result in sqlID, Total1 (null)But when returned in Map result in...
4 Jan 2016 by Member 10770419
Adding mybatis-config.xml fixes the issue if using mybatis 3.2 + version
21 Jul 2017 by winsonet
ServiceStack.OrmLite is an Open Source, Fast, Simple, Typed ORM for .NET, the performance is better than EntityFramework and more flexible. You can find more detail in their GitHub site.And in this article, I will show you how to do the code first with OrmLite and keep the data.
17 Oct 2013 by pxysea
how to use join with sqlite db?
17 Oct 2013 by André Kraak
This should clear it up SQLite - JOINS[^]
19 Aug 2014 by SRS(The Coder)
Hi,I have a stored procedure which returns two records while executing directly from SQL Server Management Studio from which i am taking the top 1 record only.Let say Record 1 & Record 2When executing the stored procedure directly from SQL Server Management Studio it returns Record 1...
19 Aug 2014 by Magic Wonder
Hi,As i know, data stored in database is in scattered manner. So, whenever you execute query without sorting, it displays result in that order in which it get data first. Whenever you mentioned the sorting, it again fetches the data in same manner but after fetching all data it apply sorting...
20 Aug 2015 by Member 11355698
I would like to implement ORM framework. I'm interested in loading related objects. I want to load an object and it's relation by one query. For instance: load CustomerOrder its OrderLines (CustomerOrder.OrderLines ) + CustomerOrder.OrderLines.Products. I need to join 3 tables here but need an...
1 Nov 2013 by LEADTOOLS Support
Improving Forms Recognition Results with Automated Alignment
11 Jan 2023 by keerthi raja
Using Insight.Database to Run and Complete SELECT SQL Commands (.NET Micro ORM)
13 Jun 2017 by Adam O'Neil (Travelers Rest, SC)
Introduction to Postulate, a code-first ORM for SQL Server made with Dapper
21 Feb 2014 by jgauffin
Introducing the data mapper in Griffin.Framework
4 Jan 2015 by Suffyan Asad
Percolator Analysis Services is a LINQ to MDX ORM that enables writing MDX Queries in LINQ instead of using hard-coded strings of MDX code, resulting in cleaner, easier to read and easier to maintain code.
11 Mar 2014 by mbarbac
Implementing the Repository and Unit of Work Patterns dynamically using Kerosene ORM
8 Jun 2018 by Ansel Castro
The article describes some exciting features of Enterlib for Android like its Object Relational Mapper and the Dependency Injection Engine.
16 Dec 2015 by Brady Kelly
Can anyone suggest a good NHibernate tutorial for me? I have searched the CP articles for those in the last year, with ratings 3-5, and found nothing looking like what I want. I have found one good looking article, NHibernate Made Simple[^], but it's from 2007, and I suspect NHibernate has...
21 Dec 2015 by CHill60
I always find it a good idea to take information straight from the horse's mouth - i.e. use the tutorial at the NHibernate[^] site and then refer to the various How-to articles on the same link.Just because the article you found is out of date does not necessarily mean it is of no use to you...
4 Aug 2017 by amey.rane86
I'm using Dapper and I have classes like this: public class Region { public Region() { Countries = new List(0); } public int RegionID { get; set; } public int RiskRank { get; set; } public string Name { get; set; } public int SiteID { get; set;...
29 Jun 2014 by Syed M Hussain
A lightweight Entity based Framework
30 Oct 2013 by Marc Leger
ORM, databinding, asynchronous data access, and transactions
13 Aug 2015 by Gaurav Aroraa
NHibernate threw an error when used Reserved SQLserver kerywords with in mappings, queries, etc.
9 Dec 2012 by MarkChimes2
A small utility that generates C# code for each of the layers in an nTiered system.
22 Sep 2014 by adityaswami89
Object/relational mapping (ORMs)
3 May 2014 by aspdotnetcrazy
Hi All, When I searched through Google, I found lot many OMR Software SDK's like LeadTools, AccuSoft, Abbyy etc. Many of them have listed similar features. If anyone of you have used these software, please let me know which one is good. My preference for selection of good software will...
14 May 2014 by Ibrahim Shrourou
Full disclosure: I work for LEAD Technologies, but since you asked for advice, I hope you don't mind us chiming in.Our toolkit has a strong OMR engine that is easy to implement and supports many programming interface. The toolkit comes with OMR demos that can help you test the OMR engine....
30 Apr 2018 by zsh64
My old app is big and written in Delphi and SQL Server 2005 now I want to rewrite (webapp)Why should I use ORM instead of creating SQL queries (complex or nested)?When I use ORM in web application ?And a general question "mvc or webforms"?Thanks
10 Jan 2013 by Christian Graus
MVC, for sure. It's amazing. So much better than web forms. As for the rest, I would use Entity Framework, just because it's pretty standard, and it works well. I guess the alternative question is, do you have a ton of stored procs written ? If so, writing a data layer for those procs might...
4 Sep 2015 by Victor Porton
Should an ORM implementation query the DB as soon as an active record iscreated in order to check that the queried row exists in DB, or is it OK tothrow an exception later when attempting to access a field (for annonexistent row)?
27 Jun 2019 by Eric P Schneider
Perform parallel queries with the Symbiotic Micro ORM
27 Jan 2015 by Vaclav Naydenov
Comparing the performance of two similar CRUD server apps, one written in Python and SQLAlchemy, the other in C++ and YB.ORM.
21 May 2014 by jim rays
Hi there,We are building a solution where handwritten questionnaire forms with objective and detailed response questions are required to be interpreted.Could you please suggest any opensource tool for the same ? We already tried QueXF and it's suite but it does not bring satisfactory...
21 May 2014 by Kornfeld Eliyahu Peter
This is probably the best open source library for OCR - https://code.google.com/p/tesseract-ocr/[^]Also Microsoft has an Inkanalyzer class (belongs to WPF) that can help you - http://msdn.microsoft.com/en-us/library/system.windows.ink.inkanalyzer(v=vs.90).aspx[^]
21 May 2014 by thatraja
Check this listComparison of optical character recognition software[^]Check all OCR websites for more details like Documentation, tutorials, forum, etc.,
30 Oct 2014 by Vaclav Naydenov
How C++ library YB.ORM can help manipulate the data stored in RDBMS using domain classes. Basic concepts of ORM are explained by examples.
1 Mar 2016 by Akhil Mittal
Enterprise level application architecture with Web APIs using Entity Framework, Generic Repository pattern and Unit of Work.
19 Dec 2016 by Дима_89
I'm using ServiceStack.OrmLite v4.0.62 because of .NET Framework 4.0. I need to perform search functionality. As my POCO classes have deep hierarchy, I need to use LINQ queries with nested subqueries. E.g.:// some code is omittedExpression> condition = p =>...
5 Oct 2021 by Eric P Schneider
The article demonstrates database create, read, update, delete operations using the .NET Symbiotic ORM.
23 Oct 2015 by Codeman the Barbarian
In the tip, I go through one approach to integrating SQL Server's FILESTREAM type with Nhibernate.
15 Feb 2015 by Sacha Barber
A look at how to unit test code that makes use of Repository vs using raw Entity Framework, where we will do this using mocks/test doubles
7 Apr 2014 by CognitiveFeedback
Hi, I have just started a new project, and, I have just discovered that the database implements a 'tractability' requirement whereby every table has "ModifiedBy" and "CreatedBy" (and ModifiedWhen, CreatedWhen) columns for tracing changes to particular Users, as is standard practice....
1 Jan 2022 by Member 9614352
I am new to Nhibernate and I don't know how to create a polymorphic relationship/mappings in my application. I have tried different solutions and tutorials but unfortunately I am still not been able to figure out how can I make this work. Following is my database structure in which...
1 Jan 2022 by Adam Flow
As stated in this wiki: Fluent NHibernate Any Quote: There are three things you need to provide to be able to map using an Any; a column that holds the type of the entitiy, at least one column holding the identifier value, and a type for the...
30 Jan 2013 by Xenit7
Honestly I didnt even know how to give this topic a Headline so please don't hold it against me.So here is my scenario, I have been a ASP.NET dev for a while and have lived in that comfort zone of SQL Server and C# or basically the MS universe denying the requirement that i would ever need...
1 Jul 2020 by Steven8579
I'm trying to use model objects to make my code less vulnerable but I'm having a problem with the syntax I believe. In the Documentation for the Micron ORM Miron ORMDocumentation it displays the following example: MicronDbContext micron = new...
1 Jul 2020 by Garth J Lancaster
1) I presume by 'not working' you mean there are no records returned ? it's good to be explicit here 2) The code you have certainly seems like a transliteration of their example and your data - obviously it builds, so syntax error I think 'not'...
10 Mar 2017 by Dave Clemmer
Going over key features of the VITA open source ORM and .net application framework, with sample SPAs using the MVC/AngularJS/WebApi/VITA technology stack.
3 Feb 2013 by Enrique Albert
Unit of Work and Repository RavenDB implementation example
13 Mar 2014 by Thomas Benz
I am using Entity Framework 5, C# and Visual Studio 2012 to do a project. One of SQL Server tables of that project keeps data in hierarchical structure; its name is Employee. The Employee table is considered as a forest of employee trees (employee groups). Each tree starts with a row whose...