Click here to Skip to main content
12,078,795 members (51,291 online)
Click here to Skip to main content

Stats

40.9K views
2K downloads
86 bookmarked
Posted

LINQ FAQ: Part 2

, 28 Jul 2009 CPOL
This FAQ article is dedicated to LINQ to SQL.
CRUD.zip
LINQCrudWithEntities
LINQCrudWithEntities
App_Data
Sales.mdf
Sales_log.LDF
bin
LINQCrudWithEntities.dll
LINQtoSQLStoredProc.dll
LINQCrudWithEntities.csproj.user
obj
Debug
TempPE
Properties
LINQCrudWithEntities
App_Data
Sales.mdf
Sales_log.LDF
bin
LINQCrudWithEntities.dll
LINQtoSQLStoredProc.dll
LINQCrudWithEntities.csproj.user
obj
Debug
TempPE
Properties
LINQtoSQLStoredProc.zip
LINQtoSQLStoredProc
LINQtoSQLStoredProc
App_Data
Sales.mdf
Sales_log.LDF
bin
LINQtoSQLStoredProc.dll
LINQtoSQLStoredProc.csproj.user
obj
Debug
TempPE
Properties
OneMany.zip
LINQtoSQL
SimpleLinqExample
App_Data
Sales.mdf
Sales_log.LDF
bin
SimpleLinqExample.dll
obj
Debug
TempPE
Properties
SimpleLinqExample.csproj.user
Optimizing_LINQ.zip
SimpleLinqExample.dll
SimpleLinqExample.csproj.user
SQL
using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.Linq.Mapping;
using System.Data.Linq;
using System.Reflection;

namespace LINQCrudWithEntities
{
    [Table(Name = "Customer")]
    public class clsCustomerEntity
    {
        private int _CustomerId;
        private string _CustomerCode;
        private string _CustomerName;

        [Column(DbType = "nvarchar(50)")]
        public string CustomerCode
        {
            set
            {
                _CustomerCode = value;
            }
            get
            {
                return _CustomerCode;
            }
        }

        [Column(DbType = "nvarchar(50)")]
        public string CustomerName
        {
            set
            {
                _CustomerName = value;
            }
            get
            {
                return _CustomerName;
            }
        }

        [Column(DbType = "int", IsPrimaryKey = true,IsDbGenerated=true)]
        public int CustomerId
        {
            set
            {
                _CustomerId = value;
            }
            get
            {
                return _CustomerId;
            }
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Shivprasad koirala
Architect http://www.questpond.com
India India

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.160212.1 | Last Updated 29 Jul 2009
Article Copyright 2009 by Shivprasad koirala
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid