Home > C# (Page 3)

Lazy loading in entity framework

One of the biggest issue when we use entity framework that is when we request for one single table you will get all related tables in table object. for example: [crayon-6767bada734dc759692240/]  in above code you will get all related tables in company object. We can avoid this using Lazy loading. for example: [crayon-6767bada734e1247913450/]  in this case you can get only

This Article is TAGGED in , , , , , . Read more

A Cool New ‘Paste JSON As Classes’ Feature in ASP.NET Web Tools 2012.2 RC

Here’s a simple example:A) Copy to clipboard your JSON object.[crayon-6767bada7394e936772053/] B) In VS2012, open edit menu, choose ‘Past Special’ and click on ‘Past JSON As Classes’.The result:[crayon-6767bada73951159179884/] Of course it also supports more complex objects like Multi-Dimensional Arrays etc.              

This Article is TAGGED in , . Read more

How to added Script Manager Dynamically before Any Control Need its in asp.net?

The control with ID 'updpnlRightNav' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it.   Solution :  1) Add a PlaceHolder on This Page Then ...Create Event on Update Panel OnInit     <asp:PlaceHolderID="pccScriptManager"runat="server"></asp:PlaceHolder>       <asp:UpdatePanelID="updpnlRightNav"runat="server" OnInit="updpnlRightNav_Init"> 2)    protectedvoid updpnlRightNav_Init(object sender, EventArgs e)     {              if (ScriptManager.GetCurrent(Page) == null)             {                 //   

This Article is TAGGED in , . Read more

How to get notification from database when any transaction on records?

Technologies Used: Visual Studio 2013 Express Sql Server 2008 R2 Express MVC 5 Nuget SqlDependency MSDN SignalR 2.0.1 Nuget Jquery 2.0.3 Nuget Toast Notifications Script to Create Broker & Service: create a user called "GeneralUser" with a password of "dbpassword" in your SQl Server logins. Run the following script in a Sql query pane, to create a message broker\service for

This Article is TAGGED in , , , , , , . Read more