Tag | Linq To SQL Posts

There aren’t many applications that are of value without having some for of data store. In Windows Phone development we have a few options. You can store text directly to isolated storage. You can also use a number of third party libraries to create or mimic databases in isolated storage. With Mango we gained the ability to have a native .NET database approach which uses LINQ to SQL. In this article I will try to bring together the components needed to implement this last type of data store and fill ...
While I have been using Linq to Object for a couple of years now I had not investigated Linq to SQL up to this point. I figured I would put together my take on this technology’s use. Linq is a wonderful syntax for navigating an object graph without having to walk the graph object by object and member by member. It is concise and compact but for someone who has never seen its syntax you would swear you went from reading English to obscure mathematic notation. If you want to learn about the general ...
In my previous example we talked about how to fetch data from database and how to populate the form with data using L2S. In this example I’m going to extend a little bit of what I have demonstrated in my previous example. Basically I’m going to show you the basic way on how to edit and delete data from the form and update the database using L2S technology. Since this is a continuation of my previous example so I would suggest you to refer that first before you go any further. STEP 1: Setting up the ...
In my previous example I have demonstrated how to create a simple form that would allow users to insert data to the database using L2S. In this example I’m going to demonstrate how to fetch and filter data from database and fill the fields in the form using L2S. This example is basically a continuation of my previous example here. So I would suggest you to take a look at my previous example first before you proceed reading this example. STEP 1: Setting up the GUI To get started, add a new WebForm ...
Few months ago, I’ve created a simple demo about “Creating a Simple Registration Form using the ADO.NET way”. In this article, I'm going to demonstrate how to create a simple form that would allows users to insert data to the database using L2S. As an overview, LINQ to SQL is a technology that allow you to query sql server. LINQ to SQL is an O/RM (object relational mapping) implementation that ships in the .NET Framework "Orcas" release, and which allows you to model a relational database using .NET ...
While I was planning to write about the same topic and have the draft ready in my Windows Live Writer waiting to complete, I found an interesting question in StackOVerflow and couldn’t just resist to answer: ORM/Persistence layer Advice The question starts with: I'm starting a new project and I'm looking around for either a very good ORM or for a non-SQL-based persistence layer. Then follows up with a REALLY GOOD summary of what he believes about each known ORM he knew out of his own findings and ...
This example shows the basic way on how to populate a data from database to a ListBox/DropDownList control using LINQ to SQL. Note that I used Northwind database here just for the simplicity of this example. To get started then let’s go ahead and add a new item in your website application in Visual Studio 2008 or VWD Express 2008. To do this, just right click on the web site -> select Add New Item -> and on the Templates select LINQ to SQL Classes as shown below and click ok: Now open up Server ...
Allow me to quote here some emails I sent to the the Dot NET developers group in my company, Injazat, or, as we call ourselves, Ninjazat. I thought it’ll be useful to share some with you as well. · ASP.NET MVC - 20 Hours of FREE Video Tutorials · LINQ FAQ o LINQ FAQ for Newbie’s o LINQ FAQ Part 2 · How we handle application configuration · ScottGu ASPNETMVC Session Video Available Now (Part 1/2 & 2/2) · Web Validation: Best Practices and Tutorials · Building a Single Sign On Provider Using ASPNET ...
I mentioned a while back that I had something I was working on that involved a change in language, actually a pretty radical change. I have been working on vocational project written in VB.net and made heavy use of LINQ to SQL. I wasn't sure of LINQ to SQL for anything else other than RAD and to be honest I'm still not. Anyway, I'm not getting into that debate. Needless to say I went all the way and don't use a single sproc in this project. Some of you will know I play cricket every Saturday for ...
I have recently came up against a perfect opportunity to get stuck into LINQ to SQL, its a small project where RAD is top priority. As often is the case I need to audit changes to properties, normally I would probably do some work in the getter and setter of the property, but of course with LINQ to SQL I don't have access to the properties in the same way. Looking through the intellisense of the LINQ generated class I can see a PropertyChanged and PropertyChanging event, perfect! Not exactly. Here ...