Cross join in LINQ
It is simple to implement to cross join in LINQSuppose i have 2 tables 1. Customers & 2.orderNow i want cross join on both tablesvar q = from c in dataContext.Customers from o in dataContext.Orders select new {
Read moreIt is simple to implement to cross join in LINQSuppose i have 2 tables 1. Customers & 2.orderNow i want cross join on both tablesvar q = from c in dataContext.Customers from o in dataContext.Orders select new {
Read morewe can implement left outer join in LINQ as wellsuppose i have 2 tables 1. product 2. order. In the order we have foreign key named as productId reference to product tableNow we want to achieve left or left outer joinvar q=(from pd in dataContext.Products join od
Read moreEXEC sp_databasesEXEC sp_helpdb ----SQL 2000 Method still works in SQL Server 2005SELECT nameFROM sys.databasesSELECT nameFROM sys.sysdatabases ----SQL SERVER Un-Documented ProcedureEXEC sp_msForEachDB 'PRINT ''?'''
Read moreThe only thing that needs to change to run this script are the database where you want this to run and the values for these two parameters: @stringToFind @stringToReplace [crayon-673f1686ba07b220020000/]
Read moreIf you want to apply order by on column which contains data likes numbers, string..etc Then here is the solution [crayon-673f1686ba167954032082/] Input:- a ba ab 1 as 2 Output:- 1 2 a ab as ba :)
Read moreTechnologies 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
Read moreStep 1: Execute below query at your database: [crayon-673f1686ba59f258602789/] Step 2: Add following line your web.config file [crayon-673f1686ba5a5694052058/] Step 3: Make sure that session object is serialize.
Read moreBelow is the sample code: [crayon-673f1686ba85c375917638/] Enjoy :)
Read moreIf you have data in excel and you want to add data in you database using C# this is useful example. Follow below steps: Step 1: Create database tables to import data [crayon-673f1686ba937721543100/] Step 2: Add below namespaces in your project [crayon-673f1686ba93b826664957/] Step 3: Add below method and send file path to this method as parameters. [crayon-673f1686ba93d584155392/] This method get file path
Read more