ADO.NET :: Light Weight Data Access Wrapper
Mar 8, 2011
I am just trying to figure something out. At work we have alot of data access code Ex:
[Code]....
Pretty standard stuff really, but I was at a training course recently where the Developers insisted on wrapping code, that seemed nothing more than expose exactly the same functionality.
I was interested in your thoughts as to whether this was a good idea. So the above would inherit from a DbHelper class with some thing like:
[Code]....
These would just expose the same but maybe a bit more generic i.e. using DbCommand as opposed to SqlCommand.
View 1 Replies
Similar Messages:
Dec 6, 2010
The app is a small .exe to be installed in multiple machines. Each will access the db to get/update a field in a table and should be less than 1000 calls to it per day. I'm concern about the "locking" error message that I sometimes encounter (rarely) when running the program. Maybe increasing the default timeout would make it wait longer until the db is no longer locked?
View 2 Replies
Aug 8, 2010
I'm going to design a database for an image gallery in ASP.NET Web App . Because of some reasons I've decided to store the image in Data Base , Not the address .
In the application i need two or more different size and weight image for each image that the admin insert .For instance , One of them is small and lightweight thumbnail , and the other is Original big one .
My question is : Should i have two column ( one for lightweight and small thumbnail and one for big and full size one ) in DataBase Or Is there any way i could load different size and wight image from Big and original image column ?
View 1 Replies
Mar 23, 2011
I have a gridview that has the following colums Category, Weight , and an option to delete row. I user would like to be able to highlight two columns in excel Category, Weight and then past them from clipboard to gridview.
View 1 Replies
Mar 28, 2011
I have developing simple application to save in database using visual studio lightswitch but no luck. I'm getting "Caption : unable to Save data... Submit operation failed. The remote server returned an error:NotFound. The remote server returned an error:NotFound" error message while saving. Also running the application, I'm gettingwindows security popup window. I have installed Visual Studio 2010 with SP1, Ligthswitch, SQL Server 2008 R2. OS: Windows 7 Enterprise. System not connected to any Domain and no password for windows. the issue occuring during development itself.
View 1 Replies
Oct 27, 2010
I have a gridview that contains one linkbutton within itemtemplate. I bind this gridview with a table from my database that displays different items. When the gridview displays records and when the user clicks on an item of gridview then how can i change that item's fontweight to bold and change that same item's color.
View 3 Replies
Feb 7, 2011
I am trying to increase the line weight of my line chart in crystal report, is that doable , yes or no ?
View 2 Replies
Nov 1, 2010
I'm using SSRS 2005 and I would like to change the text weight of a textbox (in a table) dynamically based on a condition from normal weight to bold.
View 1 Replies
Mar 17, 2010
Today we have a windows application that, using an OCX, creates a web page (visible by a WebBrowser control in a small .NET WinForm application) and communicates through COM to the main application/client. (not relevant but this is Pascal)
I'm currently responsible to re create this application in a web environment so we can have the same functionality shared through Web as the user can see the same in a Web Browser.
The Windows application has almost 4 years on it and I need to re create everything from scratch, and all the bugs/features find in the future in the Windows Application I have to re create them again in the Web...
is there any way I can create a Wrapper, even using 3rd party commercial objects, to:
Communicate with the COM Object Can expose the content of the OCX (this in my most confortable language, ASP.NET C#, but other are welcome) I was thinking out loud, can this be accomplish with a Java Applet? Silverlight 4?
View 1 Replies
Feb 8, 2011
I'm trying to create a SessionManager class which I can use to manage sessions in my MVC applications. For that I'm thinking the best way of doing so is by creating a wrapper class for HttpContext which would then allow me to access HttpContext.Current.Session.
To be honest, I'm not really sure about the whole thing, I just feel it's the logical way of doing so. I also want to create an ISessionManager and ISession interfaces, and then implement them according to my application's needs. For my current project, and for now, I need a InProc session management, but I might need to store session data in MSSQL Server when we decide to expand and use a web farm or a garden. That's why I'm trying to build a sort of an extensible framework right from the start.
Final note, I will be using Microsoft Unity to inject the concrete SessionManager of choice. I believe that's a good way to maintain a certain level of abstraction.
View 1 Replies
Oct 15, 2010
creating dataset wrapper in c# with sample code..
View 3 Replies
Nov 8, 2010
I wrote a webmethod (Called SearchData()) in which the method makes a httpwebrequest to another url and gets the data in xmldocument. After getting the xmlDocument ,it is returned to SearchData method invoker. When i invoke the from browser it works fine. But When another application in java tries to consume this webmethod SearchData(), it is getting the error
<wsdl:part name="Body"/>
and each part should be type defined. The WSDL file is not well formatted. it doesn't have Type defined at each element. How to fix this.or Is there any other Better way to provide the end user the xml(ie from httpwebrequest result in webmethod ) with a soap wrapper ie with a well defined wsdl. My code :
[Code]....
View 1 Replies
Nov 24, 2010
I have a third party dll and i need to add some more functionalities (methods, constants etc..) so create a wrapper class. I have no idea about wrapper classes. what is the purpose of this and how to create in .NET for this 3rd party dll.
View 6 Replies
Jul 15, 2010
I have this CollapsiblePanelExtender (below) the problem is that in firefox it gives a horizontal scroll bar under the control which has to expand.
[Code]....
Below is the generated HTML
[Code]....
If I remove the "overflow-y:hidden" from the generated div then the scroll bar goes away, which is what I want....
View 3 Replies
Oct 5, 2010
I am a REST web service newbie, does visual studio, .NET, or some other nifty microsoft tool provide any easy way to auto generate classes to consume a REST web service? With REST services is there even a service definition like there is with SOAP (WSDL) beyond the printed documentation? There is a new service that I'd like to consume but they only wrote wrappers for PHP, Pearl, Ruby, and Java and have more or less said you are on your own with .NET. I could write it myself but I'd like to cut corners and save time wherever possible.
View 1 Replies
Aug 13, 2010
I've seen how to Fake the SessionState object in MVC using Scott Hanselmans MvcMockHelpers, but I'm dealing with a separate problem.What I like to do is create a wrapper around the Session object to make objects a little more accessible and strongly typed rather than using keys all over. Here is basically what it does:
public class SessionVars{ public SessionVars() {} public string CheckoutEmail { get { return Session[checkoutEmailKey] as string; } set { Session[checkoutEmailKey] = value; } }}
So that I can just do this in my controllers and views:
SessionVars s = new SessionVars();s.CheckoutEmail = "test@tester.com";
Now the problem comes in when I want to write unit tests, this class is tightly coupled with the HttpSessionState. What I can't figure out is what is the right class to accept/pass so that I can pass in a FakeHttpSession into the SessionVars class. I've tried so many things with this, and this (below) will compile, but it can't cast the HttpSessionState into the IDictionary. I've tried ICollection, HttpSessionStateBase.
public class SessionVars{ public SessionVars() : this(HttpContext.Current.Session) { } public SessionVars(ICollection session) { Session = (IDictionary<string, object>)session; } public IDictionary<string, object> Session { get; [code]...
I'm missing something big here. I feel like this is possible and that I should even be that far off.Furthermore, I'm confused as to whether I should use the IHttpSessionState, HttpSessionStateBase or the HttpSessionStateWrapper. What is the abstract type that I'd use for the session object inside my SessionVars class? What is the type that I pass into the constructor?
View 3 Replies
Feb 5, 2010
How do silver light and WPF relate to asp.net? is one more geared towards asp or windows?
View 6 Replies
Mar 25, 2011
how to use Render Action in Light Box?
View 2 Replies
Sep 25, 2010
Anybody seen any c# code examples for using Google site search to send a request to the Google search api and return the results in xml?
View 1 Replies
Mar 4, 2010
Not sure if I'm posting in the right place so please forgive meI have an ASP.NET C# application that connects to either a SQL Server or MySQL database depending on some value that is set in my project config. The issue I'm trying to avoid is handling the connections and queries separately. Ideally I would want to use a DB Wrapper class that can handle both SQL Server and MySQL.
View 8 Replies
Mar 18, 2011
When jQuery is applied to elements in an UpdatePanel, when the UpdatePanel refreshes, the jQuery is not applied to the newly injected HTML. This issue is resolved by using
Sys.WebForms.PageRequestManager.getInstance().add_endRequest() to register a function to be called when the AJAX request is complete: I've written a function that registers the function with add_endRequest, and also calls it at the same time:
Async.RegisterAndRun = function(callback) {
//register function to be run when an update panel request is complete
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(callback);
//also run the function right now.
callback();
};
Now all we need to call is Async.RegisterAndRun(AddFancyjQueryToMyHTML); or
Async.RegisterAndRun(function(){
AddFancyjQueryToMyHTML();
AddMoreFancyjQueryToMyHTML('with', 'args');
});
Currently it does what I need it to, and I never need to explicitly call add_endRequest which is nice.
View 2 Replies
Jan 19, 2011
I am using ASP.net with WebMethods to show data to the customer and save data entered by the customer.
My current framework uses javascript to create an xml with all of the values of all the html elements in de "div" (or other element). This xml is converted to a string and send to the webserver using PageMethods.
When I receive this xml (as a string), I parse it with my own XmlDataParser which does some security checks.
I need to parse the xml to an XmlDataParser in every PageMethod I use, and I also need to catch different exceptions (like exceptions that are thrown when data is validated) to show them to the user (=> The reason why is explained in one of my previous posts: [URL]
I wonder if it is possible to write a wrapper around the WebMethod, so I can parse the xml to the XmlDataParser in this wrapper, and pass it on to the code behind, and process exceptions that occur in the code behind?
View 4 Replies
Mar 26, 2011
How to show Razor View in J Query Light box give me a full example.
View 10 Replies
Dec 21, 2010
I am new in web developement, creating the web Traffic Light user control?
THe user control will have 3 indicators just like the real traffic light: red indicator which will be blinking when error state is received; yellow indicator which will be blinking when the warning state is received; green indicator which will be illuminated when the normall state is received.
View 2 Replies
Aug 24, 2010
I am showing preview of text in text box.
But if text color is light(Like white) and i want to show that text preview than text is not visible because textbox background color is white.
Can i get the range of dark and light color so i'll change textbox backgroun color accordingly.
View 3 Replies