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.
Related
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 fairly new to the Repository pattern (just got back from stone age, hi everyone :-). My dilemma is that I am need to develop a way my Windows Store app work with SQLite (SQLite-Net) today, and in a near future work off WCF services (or some non-direct database access). Basically I want to switch provider for my data access layer easily.
The best site I came across with example is this blog (http://blog.longle.net/2013/05/11/genericizing-the-unit-of-work-pattern-repository-pattern-with-entity-framework-in-mvc/)
But like any other place it still have heavy dose of Entity framework which I don't think applicable to my situation.
Can someone point out possible solutions or references that I can further work on ?
Thanks
Welcome back! I hope the food was good. :-)
You can implement the Repository pattern by writing your own data access layer (DAL) as an interface, and then just writing adapter classes to SQLite and WCF respectively, that both implement that interface. Your interface(s) would define query methods and update methods. For example, you can write the following:
public interface IWidgetRepository
{
// Query methods
Widget GetById(string id);
IEnumerable<Widget> GetFeaturedWidgets();
IEnumerable<Widget> GetRecommendedWidgetsForUser(string userId);
// Update methods
void RenameWidget(string id, string newName);
void UpdateWidgetPrice(string id, decimal newPrice);
}
See also this answer on a similar question; it goes into some more detail. You're in the same situation as in that question, even though it looks different on the surface because you're coming from a different starting point. But the solution is the same once you see how the underlying pattern works.
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.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Improve this question
I am doing a project in MVC 3 with C# and would like to put test cases to simulate user actions in Views, and compare if the data was saved correctly in the database. But searched and did not find any material or good example.
Any suggestions how to do?
This is called "end-to-end" testing, or "integration" testing, and there are many frameworks and solutions out there for this.
One that I have used in the past is Selenium: http://docs.seleniumhq.org/
But there are many others: http://en.wikipedia.org/wiki/List_of_GUI_testing_tools
They are called "end-to-end" because they automate the UI as if it is the user performing the actions, and then they run steps to validate the results of said actions; in this way, they test the entire application at once rather than each independent component individually (as is the case with Unit Tests).
An important aspect of writing tests is that views and UI are difficult to test / simulate. MVC and MVVM get around this by letting you test your Model and Controller or your Model and ViewModel.
There are tools that help you to test the views for doing UI testing like Watin, Selenium etc.
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 8 years ago.
Improve this question
I am new to VS( about 6 months), we have an application built using WCF and I am looking for some pointer to build a automation framework around it.
I tried with soap UI but its too simple for my application, any suggestions/pointers where and how should I start building this framework( only option I see here is Nunit.
here is my requirement, I am looking more of step by step guide to achieve this
A simple framework which will send some precooked input to the service and will have some expected value, this expected value will then matched against the actual value assert.
This sounds like a good candidate for Visual Studio's Web & Load Test feature. I personally use these to test WCF endpoints frequently. You can either record steps using your browser, or write code that consumes your service. Either way, it functions just as a normal unit test does.
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.
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