Is there any simple SQL ORM for C#? -
i'm not looking fancy queries, utilize state-of-the-art c# funny business generate slick queries, automagically map classes database tables, or works off of loads of metadata has configured developer. in fact, want orm agnostic fact using c#.
instead, want able perform simple commands perform basic sql tasks, such as:
a class handle connection sql server , perform dynamic tsql statements. a class represent database, ability create database, drop database, find, add, or drop tables, etc. a class represent tables in database, add together columns, drop columns, etc.however, each of these preferably simple providing strings @ table:
connection = new connectiontosqlserver(connectionstring); database = connection.finddatabase("mydatabase"); foreach(table table in database.tables()) { table.addcolumn("mycolumn", typeof(string), columns::not_null) ... }
is there remotely when dealing sql , c#? i'm not terribly worried having top performing apparatus.
what have described not orm. orm object-relational mapper. is, specifically designed map database tables , queries objects in whatever language it's designed for. in addition, other things you've mentioned (ddl stuff) not part of orm (this not hard rule, since there things entity framework can handle, extent, database schema upgrades).
if targeting sql server, @ sql server management objects handle database , server maintenance tasks using managed api vs. t-sql statements, that's specific sql server , .net languages.
with regard #1 on list, you're looking isn't served dbconnection/dbcommand/dbdatareader/etc.
classes?
c# sql orm
No comments:
Post a Comment