Click here to Skip to main content
12,698,476 members (24,516 online)
Click here to Skip to main content
Add your own
alternative version


24 bookmarked

LINQ Code generator

, 31 Dec 2007 CPOL
Rate this:
Please Sign up or sign in to vote.
This generates Basic linq codes just by giving necessary inputs


LINQ code generator is simple application which generates SQl based LINQ codes by taking some inputs. As LINQ is new to many developers This basic generator is used to generate and test basic Sql based LINQ codes in less than Minutes.


as i started working on LINQ,I came to a very strong conclusion that LINQ has great future.But found it needs more changes still to be done by microsoft.

Using the code

The code usage for this is very simple We have category called LINQ here for it we have sub category LINQ with SQL under that sub category we have Insert Update Delete Select Selecting any option post backs page and give some text boxes to take some inputs just enter the required inputs now clik on generate code button code will be then generated copy code and paste it your application. with this generator forms like registration forms etc can be done simply in mins.we an also show results in grid.we can show results based on conditions etc., in order to not to deviate begineers confidence levels i tried to develop this generator with minimum options and left many more options for future.

Basic Bug to be fixed is change version from 2.0 to 3.5 in web.config before running beta.

        <add assembly="System.Core, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add assembly="System.Data.DataSetExtensions, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="System.Xml.Linq, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="System.Data.Linq, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies>

I used MS Access Database to develop Code. The final code generated need a dbml file. How to create dbml file : Create a sql database and tables in it. now add a new item , dbml file a new datacontext open design view of dbml file now drag and drop your sql database tables to dbml design area its user friendly to make relations and all there it self. generated code need a dbml file in its default path.

I Used vb code to generate LINQ code. Requirements are being added to database table and retrieved while taking inputs to generate code .

Points of Interest

Working with VS2008 beta mad me mad fr nearly 7-10 days. donno y i got mad initially in many angles. i donno i should name the problems as bugs or suggessions but they made me really feel that "some thing has gone wrong with Microsoft " Some Pretty Things(I donno if i should call as bugs) i found to suggest

  • Initiall i started developing app. and run it . thats great version error. in web.config version number is not changing automatially.i opened web.config and changed version number to many developer can try to do this?
  • i am getting some problems on renaming files.all the parent and child files related to it are not adjusting according with renamed files immediately.
  • a big primary key problem. the scenario is like i developed some db , table in it, i had give first fild as primary key i was on application ..playing with it. .. now i changed primary key to table as some thing other than first field the problem now comes even i know the problem is data comes from only dataset and not from table again... this should be reflected immediately to dataset after changes to db.
  • data context location problem.if path of dataconxt is changed the intellisense problem occurs.
  • i found some problems while inserting/editing to msaccess database using controls like formview.
  • if i use some user control and if i like to delete it from design part some lines of user control code remains there in code.
  • i cannot understand wjy microsoft is making weight of application still more and more and more....the application loading etc are terrificly slow for not a very high level confugaration system users
  • intellisense is needed in more locations like between double quotes(Not at all kidding) also.The intellisense part in code behind is more wen compared to design part.
  • backward intellisense is also needed like response.write and now if we write as write then we should get response to its front.This is not kidding i am stating this after working in differrent angles on intellisense.
  • the main and main thing is microsoft should make application smoother ,less weighter and faster.


    Even this code developer is simple smart application for confidence building. i came across all Linq Applications and found the advantages of using LINQ.

  • License

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


    About the Author

    Sree Nivas
    Web Developer
    India India
    Work Makes me Work More

    You may also be interested in...


    Comments and Discussions

    GeneralMy vote of 2 Pin
    Bhavikgoyal15-Feb-11 19:10
    memberBhavikgoyal15-Feb-11 19:10 
    Generalexcellent one Pin
    ursdpt1-Jan-08 4:16
    memberursdpt1-Jan-08 4:16 
    GeneralRe: excellent one Pin
    Mufaka1-Jan-08 8:52
    memberMufaka1-Jan-08 8:52 
    GeneralRe: excellent one Pin
    Sree Nivas1-Jan-08 18:11
    memberSree Nivas1-Jan-08 18:11 

    General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

    Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

    | Advertise | Privacy | Terms of Use | Mobile
    Web02 | 2.8.170118.1 | Last Updated 31 Dec 2007
    Article Copyright 2007 by Sree Nivas
    Everything else Copyright © CodeProject, 1999-2017
    Layout: fixed | fluid