Please forgive if I'm a little naive as I don't know Ingres and have
just picked up DbLinq to read and write a lot of information to an
Ingres database using LINQ queries.

Everything seemed jolly and quick to begin with, ran DbMetal and got
the dbml and the C#, was only 275,000 lines so I decided to clear some
of the tables out and regenerate the C#, much better.

Trying to connect and ... oh dear...

Got the following runtime error:
System.ArgumentException: Unknown connection string keyword:
'DbLinqProvider' and been stuck on this ever since... tried various
things, so am falling back on advice now.

I've pieced this code together by looking at various sites and pieces
of information as I cannot find a definitive clear source detailing
how to connect to an Ingres Database, but my code looks like this:

    public static class IngresDatabase
    {
        public static string Connect()
        {
            try
            {
                var connection = new
IngresConnection("DbLinqProvider=Ingres;" +
 
ConfigurationManager.ConnectionStrings["IngresConnectionString"].ConnectionString).ToString();

                return connection;
            }
            catch
            {
                // to do
            }
            finally
            {
                // to do
            }
        }
    }


This is utilized by the following class:

    public class CustomerRepository : ICustomerRepository
    {
        private myContext _db;

        public CustomerRepository()
        {
            _db = new myContext(IngresDatabase.Connect());
        }

        public CuST GetCustomerRecord(string code)
        {
            return _db.CuST.SingleOrDefault(d => d.CuSTTag == code);
        }
    }

Any help most appreciated....

Thanks
Paul

-- 
You received this message because you are subscribed to the Google Groups 
"DbLinq" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/dblinq?hl=en.

Reply via email to