Click here to Skip to main content
15,896,207 members
Articles / Programming Languages / C#

LINQ to SQL: All common operations (Insert, Update, Delete, Get) in one base class

Rate me:
Please Sign up or sign in to vote.
4.53/5 (42 votes)
31 May 2008CPOL8 min read 234.7K   3.5K   119  
A base class to perform all common LINQ to SQL operations.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Yazeed.Framework.Data
{
    /// <author>Yazeed Hamdan</author>
    /// <summary>
    /// Attribute specified on a <see cref="IPropertyMappingProvider"/> indicating the type of property
    /// that it maps
    /// </summary>
    [AttributeUsage(AttributeTargets.Class)]
    public class MappingPropertyTypeNameAttribute : System.Attribute
    {
        private string _propertyTypeName;

        public MappingPropertyTypeNameAttribute(string propertyTypeName)
        {
            _propertyTypeName = propertyTypeName;
        }

        public string PropertyTypeName
        {
            get
            {
                return _propertyTypeName;
            }
            
        }
      
    }
}

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)


Written By
Architect
Jordan Jordan
MCAD.NET, MCPD.NET

Comments and Discussions