MS SQL Server
  Home arrow MS SQL Server arrow Page 3 - LINQ to MySQL, Oracle and PostgreSQL Provi...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
MS SQL SERVER

LINQ to MySQL, Oracle and PostgreSQL Providers
By: Barzan "Tony" Antal
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 8
    2009-03-05

    Table of Contents:
  • LINQ to MySQL, Oracle and PostgreSQL Providers
  • Provider Possibilities
  • More About DbLinq
  • Closing Thoughts

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    LINQ to MySQL, Oracle and PostgreSQL Providers - More About DbLinq


    (Page 3 of 4 )

    Now that we have presented a few solutions on the previous page, you can decide which route to follow. On this page we will focus only on DbLinq and explain the basic guidelines for how to work with it. Keep in mind that we will keep it simple, since the sequel to this article will entirely focus on showing a real-world applicable LINQ-to-MySQL implementation (application) based on DbLinq in VC# 3.5.

    First and foremost, there are the following requirements for DbLinq. You need to have .NET Framework 3.5 installed. But this is self-explanatory since it comes with Visual Studio 2008. You are going to need this IDE to develop C# or VB applications using the DbLinq provider. However, .NET Framework 3.5 is required on execution of the compiled code as well. So the executable cannot be run without the framework.

    Furthermore, you need to download the latest available release of DbLinq. The project is called dblinq2007 and it’s featured on Google Code. You can download the archived (.zip extension) version of each release. The source codes are available via the svn page (Subversion). Let’s assume you don’t want to mess with the source code right now, so you download one of the archived releases. Extract everything.

    You will notice that there are numerous folders. Under the srcDbMetal folder you are going to find various similar batch files, such as run_myMetal.bat, run_oraMetal.bat, run_sqliteMetal.bat, run_ingMetal.bat, and so forth. These are the batch files, which are needed to be executed to create the appropriate C# files representing your database. This step is necessary and should be executed after the batch files are edited.

    With MySQL, you can see that the run_myMetal.bat contains the following:

    binDbMetal.exe -provider=MySql -database:your_db -server:your_server -user:root -password:your_pass -namespace:namespace -code:filename.cs -sprocs

    You either copy the batch file where DbMetal.exe is located (in the bin) folder and edit the script accordingly or execute the script from the main root folder of DbLinq. As soon as the script finishes, the C# file as requested will be generated. Now there’s one final step: copying the necessary files into your project. In the case of MySQL, these are the following:

    • DbLinq.MySql.dll

    • MySql.Data.dll

    • And the C# source file you generated with the DbMetal batch script.

    That is all for now. On the next page you’ll read more  about LINQ documentation.

    More MS SQL Server Articles
    More By Barzan "Tony" Antal


     

    MS SQL SERVER ARTICLES

    - Windows Server 2008 as a Workstation OS
    - An Overview of Windows Server 2008 R2
    - LINQ to MySQL, Oracle and PostgreSQL Provide...
    - Completing the Introduction to Transact-SQL
    - A Brief Introduction to Transact-SQL
    - Lookups and Blocking Bad Data
    - Field Validation Rules for Blocking Bad Data
    - Using Masks to Block Bad Data
    - Blocking Bad Data
    - Using @@ROWCOUNT and TABLE Variables for Dat...
    - How to Use Variables, IF and CASE in Databas...
    - Creating Important Aspects of Notification S...
    - Working wth Variables in Database Interactio...
    - Delving Deeper into Notification Services
    - Notification Services





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek