Reputation: 1984
I am a reasonably competent c# developer but have primarily been doing GUI and command line tools, recently been asked to begin looking at creating a small web app to allow mobile devices to maintain the data in one of our databases.
The database is an SQL 2008 R2 database that while the tables to relate to one another there are no foreign keys or any DDL relationships defined.
My question: Where should I begin to get this simple app up? I'm only editing around 7-10 tables which are mostly related (Object, object location history, object ervice history etc). I am happy to provide some table DDL if that helps in the decision.
It doesn't need to be anything fancy, just a way users can look up the objects and modify them as well as add new entries to the linked tables (service history / location history)
I have looked into a few different methods but am really struggling to find good examples on creating a simple web site/app based on an existing database without the FK DDL contained within, and again I am happy to provide any extra details upon request.
Upvotes: 2
Views: 414
Reputation: 1976
You should build your application like any other with FK DDL. Probably it would result errors in data, but ..... SISO (Stupid Input Stupid Output).
Upvotes: 0
Reputation: 101166
Sounds like you want to use the designer in Entity Framework.
Both nhibernate and entity framework (and most other OR/M) allows you to work with databases that has no FKs. But you'll have to create the mappings by yourself.
nhibernate
I personally prefer fluent nhibernate over the built in code mappings in nhibernate: http://www.fluentnhibernate.org/
Entity framework
You can create mappings for entity framework too:
Vanilla ADO.NET
You can of course use plain ADO.NET. Combine it with the repository pattern. Probably the fastest way to get a simple app up and running.
Upvotes: 2