| |
browse.develop.com
Browse.develop.com is a community that was established to collect and
organize valuable web information. Our technical staff have selected and
indexed information and courses that they feel will help you stay
current on best practices across the SDLC.
|
5 Articles match "Sample"
See all articles with
"Sample"
| The Latest from The Blomsma Code | MORE | | Generating an index in the database using Entity Framework Code First The sample below shows how it is done (thanks to Rolf for pointing me in the right direction): using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data.Entity; using System.ComponentModel.DataAnnotations; namespace CodeFirstPlayground. {. If you’re using Entity Framework Code First, then you may want to create an index on some of your table. The way to do this is to call “Database.ExecuteSqlCommand” in the “Seed” method of your database initializer. class Program. {. static void Main( string [] args ). {. where c.Name != Required]. The Blomsma Code - Tuesday, January 17, 2012 Generating an index in the database using Entity Framework Code First The sample below shows how it is done (thanks to Rolf for pointing me in the right direction): using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data.Entity; using System.ComponentModel.DataAnnotations; namespace CodeFirstPlayground. {. If you’re using Entity Framework Code First, then you may want to create an index on some of your table. The way to do this is to call “Database.ExecuteSqlCommand” in the “Seed” method of your database initializer. class Program. {. static void Main( string [] args ). {. where c.Name != Required]. DevelopMentor Courses - Tuesday, January 17, 2012 Streaming XML using LINQ to XML (continued) The code sample below will load nodes from an arbitrary XML files and yield them to the caller as they’re read from file: static IEnumerable Load( string filename, string elementName). {. Richard Blewett reminded me that the XmlReader.ReadSubtree method makes it even easier to use LINQ to XML with a streaming approach. XmlReaderSettings settings = new XmlReaderSettings(); settings.IgnoreWhitespace = true ; using (XmlReader reader = XmlReader.Create(filename, settings)). {. while (reader.ReadToFollowing(elementName)). {. // build element from subtree. NET LINQ DevelopMentor Courses - Tuesday, November 1, 2011 | | The Best from The Blomsma Code | MORE | | Reporting using Entity Framework Let’s look at a sample. The sample will work on the AdventureWorks2008R2 database which can be downloaded from CodePlex. For many years the mantra for implementing business logic in your line of business application has been: “don’t put it in the database, don’t put it in the user interface”. In other words, apply the layers design pattern if at all possible, together with implementing the Model-View-ViewModel ( MVVM ) or Model-View-Controller ( MVC ) pattern. Technologies like Entity Framework help us convert data in the database to.NET objects and add logic. Life is good. 2: GO. The Blomsma Code - Wednesday, October 20, 2010 Streaming XML using LINQ to XML (continued) The code sample below will load nodes from an arbitrary XML files and yield them to the caller as they’re read from file: static IEnumerable Load( string filename, string elementName). {. Richard Blewett reminded me that the XmlReader.ReadSubtree method makes it even easier to use LINQ to XML with a streaming approach. XmlReaderSettings settings = new XmlReaderSettings(); settings.IgnoreWhitespace = true ; using (XmlReader reader = XmlReader.Create(filename, settings)). {. while (reader.ReadToFollowing(elementName)). {. // build element from subtree. NET LINQ DevelopMentor Courses - Tuesday, November 1, 2011 Generating an index in the database using Entity Framework Code First The sample below shows how it is done (thanks to Rolf for pointing me in the right direction): using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data.Entity; using System.ComponentModel.DataAnnotations; namespace CodeFirstPlayground. {. If you’re using Entity Framework Code First, then you may want to create an index on some of your table. The way to do this is to call “Database.ExecuteSqlCommand” in the “Seed” method of your database initializer. class Program. {. static void Main( string [] args ). {. where c.Name != Required]. DevelopMentor Courses - Tuesday, January 17, 2012 | - Generating an index in the database using Entity Framework Code First
The sample below shows how it is done (thanks to Rolf for pointing me in the right direction): using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data.Entity; using System.ComponentModel.DataAnnotations; namespace CodeFirstPlayground. {. If you’re using Entity Framework Code First, then you may want to create an index on some of your table. The way to do this is to call “Database.ExecuteSqlCommand” in the “Seed” method of your database initializer. class Program. {. static void Main( string [] args ). {. where c.Name != Required]. The Blomsma Code - Tuesday, January 17, 2012 - LINQ to SQL external mapping file
Here's a little sample of how to do this. With LINQ to SQL you can choose to use an external mapping file, allowing you to map SQL statements to CLR objects (also referred to as POCO, Plain Old CLR Objects). Doing so means you do not need to adorn your classes with attributes. public class Supplier. {. public int ID { get ; set ; }. public string Name { get ; set ; }. }. public List. GetSupplier( string name ). {. SqlConnection conn = new SqlConnection ( cConnectionString ); XmlMappingSource xms = XmlMappingSource.FromUrl( @"mapping.xml" ); var db = new DataContext ( conn, xms ); Table. The Blomsma Code - Saturday, October 25, 2008 %>
216 Articles match "Sample"
See all articles with
"Sample"
| The Latest from DevelopMentor | MORE | | Optimistic concurrency in MongoDB using.NET and C# Here’s the download for the source, library with the concurrent data context, and the sample app: MongoDB.Kennedy.zip. 'This article demonstrates a technique and supporting library for adding optimistic concurrency control to NoSQL databases and MongoDB in particular. Quickly, what is optimistic concurrency control? Ideally, all databases that allow concurrent access or disconnected access need to implement some form of concurrency control. This usually comes in two flavors: Pessimistic concurrency control. Optimistic concurrency control. Edit in memory. Nice huh? Conclusion. Michael C. Kennedy's Weblog - Monday, April 8, 2013 Understanding Map - Reduce Running the sample code produces output like this. Quite a few people seem to be intimidated by the concept of Map-Reduce. As it turns out Map-Reduce is actually quite simple and straightforward when you get to understand the basic principle. Basic principle The basic Map-Reduce consists of two steps. guess you are not going to be very surprised when I tell you that these steps are called Map and Reduce. Simple right? And the Reduce process takes the output of the Map process and combines/discards data to produce the result. Again pretty simple right? simple example. 3: public Order(). The Problem Solver - Monday, December 3, 2012 Understanding Map - Reduce Running the sample code produces output like this. Quite a few people seem to be intimidated by the concept of Map-Reduce. As it turns out Map-Reduce is actually quite simple and straightforward when you get to understand the basic principle. Basic principle The basic Map-Reduce consists of two steps. guess you are not going to be very surprised when I tell you that these steps are called Map and Reduce. Simple right? And the Reduce process takes the output of the Map process and combines/discards data to produce the result. Again pretty simple right? simple example. 3: public Order(). The Problem Solver - Monday, December 3, 2012 | -
| The Best from DevelopMentor | MORE | - Access Control Service: Passive/Active Transition Sample
Here you can find my updated ACS2 sample. In addition to the existing front ends (web [WS-Federation], console [SOAP & REST], Silverlight [REST]) and error handling , it now also includes a WPF client that shows the passive/active transition with a SOAP service as illustrated here. All the ACS interaction is encapsulated in a WPF user control that: retrieves the JSON feed. displays a list of supported identity providers. triggers the sign in via a browser control. retrieves the token response. All you need to supply is the ACS namespace and the realm. Have fun! Azure IdentityModel www.leastprivilege.com - Thursday, June 23, 2011 - HTML5 Slides and Samples
The slides and samples from the HTML5 talk I did yesterday at the DevelopMentor office in London. HTML5 from Maurice Beijer Enjoy! Futures HTML5 Modernizr WebSockets WebWorkers Video IE The Problem Solver - Thursday, October 18, 2012 - Download My Web Apps Have HotKeys Too Sample App
and a sample application. I recently blogged about how web apps have hotkeys too. To encourage more developers to add hotkeys to their web applications, I created a jQuery plugin called jQuery.hotKeyMap.js just added a download link for the source code: WebAppsHaveHotKeysTooSample-MichaelKennedy-v1.zip. It’s an ASP.NET MVC 3 web app. Hope you find it useful! Cheers, @mkennedy. Filed under: jQuery Tagged: NET , ASP.NET , MVC , Open Source , Plugins , web. jQuery.NET ASP.NET MVC Open Source Plugins web Michael C. Kennedy's Weblog - Thursday, August 30, 2012 - Simple MVVM Toolkit Improvements: Documentation, Features, Sample Apps
I’ve released a new version of my Simple MVVM Toolkit for Silverlight that has improved documentation, a bunch of new features and additional sample applications. And many of those other toolkits are woefully lacking in the way of documentation and code samples. Sample applications with step-by-step instructions. have spent quite a bit of time fleshing out documentation for the toolkit, and the download includes several sample applications. Other sample apps demonstrate features such as enum lists, associated properties, and async support. Tony and Zuzana's World - Sunday, January 23, 2011 - Online Workflow 4 presentation
Attached are the PowerPoint sheets and samples from my online Window Workflow Foundation 4 presentation today. Let me know if you have any questions. WF4Demo.zip www.TheProblemSolver.nl Wiki.WindowsWorkflowFoundation.eu. The Problem Solver - Tuesday, December 1, 2009 %>
| | |