ORM for Node JS like .net Entity Framework? [closed]
Asked Answered
V

5

28

I am new in node JS, and try to implement CRUD using Node JS, Express JS , MS SQL, EJS. And I am already finished with CRUD.

But I am looking for some more reliable way to pass data or object from node to sql and vice versa.

I have to write an INSERT SQL query when I am going to insert record i.e creating entry in any table.

So, can any one know, is there any ORM which help me to deals with SQL query Like we deals in .net entity framework ?

Thank in advance.

Vimineous answered 5/5, 2015 at 7:5 Comment(0)
A
14

You can use Sequelize ORM, it supports MSSQL: http://docs.sequelizejs.com/en/latest/docs/getting-started/

Annisannissa answered 5/5, 2015 at 7:10 Comment(2)
I would be careful to use it. A lot of people seem to have a beef with it. Here is a good analysis of different ORMs for Node: reddit.com/r/node/comments/3bye2l/…Amon
Agree with Tanuki, be careful. Its not even 1/10 of what EF isWomen
L
10

Here are some ORM and their comparison Sequelize is one of the most downloaded and featured ORM for node.js

ORM

ORM

Visit for more detail

Libove answered 12/2, 2017 at 8:7 Comment(0)
C
9

TypeORM seems to be the best suited for Entity Framework nowdays

It allows to define entities very much like Entity Framework does with data annotations.

Plus it is totally TypeScript friendly. =)

import {Entity, PrimaryGeneratedColumn, Column} from "typeorm";

@Entity()
export class User {

    @PrimaryGeneratedColumn()
    id: string;

    @Column()
    firstName: string;

    @Column()
    lastName: string;

    @Column()
    isActive: boolean;

}
Corneliuscornell answered 3/9, 2018 at 15:12 Comment(2)
I will definitely try this, Thanks you link ;)Vimineous
Unfortunately the maintainers don't care too much about this project recently which is really worrying. They expecting huge donations for not ready package, so they are almost not working on it. Not merging PRs, not closing issues etc.Changeup
P
0

My answer is maybe late but now You have option to use C#/EF in node http://tjanczuk.github.io/edge/#/

Pilch answered 24/2, 2016 at 22:47 Comment(0)
L
0

You can use Sequelize ORM OR TypeORM for Node JS projects.

Leavetaking answered 24/11, 2023 at 12:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.