View Complete Post
I use in my ASP.NET MVC application repository pattern and I use in controller for example 3 models:
public class HomepageController : Controller
private IWebsitesRepository _repository_websites = new WebsitesRepository();
private IFirmRepository _repository_firm = new FirmRepository();
private IPhotosRepository _repository_photos = new PhotosRepository();
In WebsiteRepozitory, FirmRepository and PhotosRepository classes I have:
Database1Entities _entities = new Database1Entities();
So I have 3 connections to database ? Is it wrong ? How can I solve it ?
Started in middle of a new project. Our design architecture uses an n-tier (not MVC - no controllers) structure with Presentation, Data, Business and Service tiers. However the lead analyst has the majoriety of code all in the Business tier claiming it all contains Business logic. Our data tier is nothing more than a single .dbml model of the primary database to support all of the Linq queries in the Business tier. To my mind Linq queries and classes they use are data access and belong in the data tier but our lead analyst says they contain business logic therefore have to be in business layer.
Hey guys, I have these two queries I'd like to combine into one. Is there any way of doing it?
LINQ's ability to project randomly shaped data into anonymous types can be a blessing and a source of frustration, says Julie Lerman. It's great when you just need to grab a special view of your data, but it can be problematic in certain circumstances. She explains what the limitations are and how to get around them.
MSDN Magazine May 2010
Did you know that by precompiling LINQ queries you might actually be degrading your app's performance if you're not careful? Julie Lerman explains how to ensure you're not re-precompiling queries each time and losing the expected performance benefits across post-backs, short-lived service operations and other code where critical instances are going out of scope.
MSDN Magazine March 2010
This month Toolbox provides help with error logging, finds an app that helps you write LINQ queries, and explores the non-technical side of development.
MSDN Magazine September 2008
In this article we introduce you to BizTalk Services, new technology that offers the Enterprise Service Bus features of BizTalk Server as a hosted service.
Jon Flanders and Aaron Skonnard
MSDN Magazine June 2008
If you have a significant investment in legacy COBOL applications running on mainframes, you need the BizTalk Adapters for Host Integration Server .
Bashar "Bash" Badawi
MSDN Magazine December 2007
Use Parallel Language Integrated Query (PLINQ) to take advantage of multi-processor computers and the newer wave of multi-core processors.
Joe Duffy and Ed Essey
MSDN Magazine October 2007
MSDN Magazine May 2007
MSDN Magazine August 2000
MSDN Magazine June 2000
We have an application which uses 'System.Data.OracleClient'. On the box it was developed we can change the TNSNAMES.ORA entries to connect to different oracle databases. Moving the code to a Microsoft Server 2008 box it would appear that the application ignores the TNSNAMES.ORA file. It has cached the first Oracle connection and will now work without any TNSNAMES.ORA file. Where is it getting the connection? We have set tns_admin to point at the TNSNAMES.ORA file. We can tnsping the connection OK.
We have a web application using VS 2008, c#. We try to filter siteMap nodes based on security roles. We have our customized the mether GetRolesForUser() in RoleProvider class to determine a user's role. In this method, roles will be returned by querying an SQL Server database.
However, we found that each time a page was loaded/refershed, this GetRolesForUser() was called, and the database would be queried. This is too MUCH and expensive.
We thought the roles should be queried only once when a user logs in. After that, role info should be stored somewhere for this user, rather than query DB all the time.
Any ideas, reference paper, snipet,...,?
Thanks a lot!
Does anybody have links to relevant articles on how Facebook Connect integrates with the Membership provider?
I'd like to make a .net site where you can login through the membership provider, or the Facebook Connect system. But the big question is, how does your asp.net application know when the Facebook authentication has been successful. Without manually entering a username and password, is there a function to authenticate users and draw the profile info from Facebook's data?
It seems like a good system, but the documentation is sparse.
I am using visual studio 2005 and sql server 2005.
I am developing a small quiz application and i have stored the connection string in app.config file which is given below.:
<?xml version="1.0" encoding="utf-8" ?>
connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|Quiz Application.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True"
i have retrieved connection string property through configurationmanager class
and when i m connecting to database it gives me a runtime error:
Sql Exception was unhandled
System.Data.SqlClient.SqlException was unhandled Message="An attempt to attach an auto-named database for file F:\\Quiz\\Quiz\\bin\\Debug\\Quiz Application.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located