Creating Multiple DbContext in Entity Framework example [closed] - c#

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I am going to develop a project where i would like to use Entity Framework 5 with Code First Approach. I want to use multiple DbContext file. So can anyone please give an example with with a sample project to demonstrate multiple DbContext file. I will be highly grateful.
Thanks .

I don't know if this is a good idea, because there are many side effects. Have a look here:
Entity Framework: One Database, Multiple DbContexts. Is this a bad idea?
But in fact it should be working when you look at the latest comment on this thread. Just define the ConnectionString in the context and set it to the same in every context class.
If you need more informations please provide us with more informations what you are trying to achieve and what's your requirements.

Related

Is there an api in .net to display objects from sql in an applicaiton? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm looking for an API that will allow me to display database objects in a web or desktop UI. Does anyone know of any?
I'm trying to display schema and tables from a specific database so that the user of this tool can create ad hoc reports. If a user selects a table, I want them to be able to see column information as well.
I summary, the tool is supposed to be like SSIS but in a web application.
SQL Server Management Objects (SMO) - http://technet.microsoft.com/en-us/library/ms162557.aspx.
You can create LINQ to SQL classes using MS Visual Studio. That will let you see tables and their associations to one another.
http://msdn.microsoft.com/en-us/library/bb384428.aspx

Reference for ASP.NET Identity needed [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
How do I use ASP.NET Identity into empty web projects?
I didn't do the google-ing for you, I just happened to be doing some research myself and came across the following resources.
Two good blog posts on odetocode.com here and here.
On the subject of empty web projects (taken from comments from above links):
People who want to start from scratch are usually looking to do something like create a .Domain or .Core assembly with their own definition of a user that can plug into the Identity framework. Unfortunately, this means you either take a dependency on the Entity Framework in a domain assembly (to inherit from IdentityUser) or re implement IUser and IUserStore from scratch. It's also much easier to use classes like ApplicationUser for a new application but a bit difficult to manage with an existing schema until you've figured out all the pieces (like how to do mapping with EF).
There is also the Identity Database template which has all the scripts, UDTs etc. used in ASP.NET Identity, available here.

unit of work design pattern - example without entity framework? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 9 years ago.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
I'm trying to learn the Unit of Work and Repository patterns and wanted to do some samples at the same time. However, whatever I'm finding online always uses Entity Framework.
What would the Unit of Work and Repository patterns look like if not specific to Entity Framework? It is a little difficult to discern what aspects are part of the pattern and what are a side affect of integrating with EF.

How to use ORM in C#? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm writing an OOP project, need to map the object oriented domain into the database, storing objects into the database, I worked with hibernate of java before, now I look for the same thing in C#.
I heard about NDatabase but I dont use it, any one here know and work with it?
For my professional work, I really like EntityFramework. it's powerful and pretty straightforward to use. Here is the guideline to work with (provided by Microsoft): http://msdn.microsoft.com/en-us/data/ef.aspx
i would recommend EntityFramework.
Hope i could help.
Try NHibernate - .net port of hibernate.
Also, take a look at Entity Framework
I think, choosing an ORM solution depends on the database you gonna use. If you're sure it's Sql Server, definitely go for Entity Framewrok since all the advanced features (like code-first) are supported there out of the box. If you go for Oracle, I would suggest NHibernate especially since you already know Hibernate

MS Access Query Designer - similar functionality using standard .NET 3.5 controls? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I would like to achieve something very similar to Microsoft Access query designer - I am talking about a plane(canvas?)-like surface on which users can place and move controls. Is this even possible?
If it isn't possible with free .NET controls - then are there any paid ones, which offer similar functionality?
Anything is possible if you try hard enough.
I would explore WPF, it will provide capabilities to custom build your own controls and will get rid of that tedious work of keeping the UI updated.
Make sure to follow a good UI pattern if you do end up working with WPF, here is a good video that explains how to implement MVVM in WPF.

Categories