-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Insert method #35
Comments
Notice that Mig# does not offer any data manipulating operations. It is about schema changes only because this is the part, where different platforms differ and there are no standards. As for data manipulation such as inserting, updating, deleting records, or copying tables, etc., it can be done in many ways. The syntax you present is only one possibility, but there are plenty other approaches which might be more suitable for different users. There are libraries that specifically address this concern. To add this to Mig# would mean to open a door to a completely different area and I don't want to do this to keep the scope of Mig# well defined and lean. Note that you could easily implement your own extension method on IDatabase that provides you what you need. |
I did notice :) De: dradovic reply@reply.github.com Notice that Mig# does not offer any data manipulating operations. It is about schema changes only because this is the part, where different platforms differ and there are no standards. As for data manipulation such as inserting, updating, deleting records, or copying tables, etc., it can be done in many ways. The syntax you present is only one possibility, but there are plenty other approaches which might be more suitable for different users. There are libraries that specifically address this concern. To add this to Mig# would mean to open a door to a completely different area and I don't want to do this to keep the scope of Mig# well defined and lean. Note that you could easily implement your own extension method on IDatabase that provides you what you need. Reply to this email directly or view it on GitHub: |
There are a couple of other libraries. I remember evaluating some, that it's too long to remember names. I just found http://www.codeproject.com/Articles/16610/SQL-Statement-Generator and http://stackoverflow.com/questions/7172008/c-sql-query-builder-class with a quick Google search. But there are others, too... |
In order to keep the scope of Mig# clearly defined (schema ops and not data ops), this feature will not be implemented. As said, there are other libraries out there that provide this functionality. |
I am currently migrating from Fluent Migrator to MigSharp, and the only feature I miss is an IDatabase.Insert() method such as :
Insert.IntoTable("Users").Row(new { FirstName = "John", LastName = "Smith" });
(https://github.com/schambers/fluentmigrator/wiki/Fluent-Interface)
I know I can work around this with IDatabase.Execute(), but an Insert method is cleaner, easier to write and most of all written in C# and not SQL.
The text was updated successfully, but these errors were encountered: