locked
LINQ to SQL RRS feed

  • Question

  • Hi everyone,

    I already have Northwind database but when I can not understand how to make code below work?

    using System;
    using System.Linq;
    using System.Data.Linq;
    using nwind; // how make it possible to write this?

    namespace DemoNamespace
    {
        public class Program
        {
            static void Main()
            {
                Northwind db = new Northwind(@"Data Source=.\sqlexpress;Initial Catalog = Northwind");
                var custs = from c in db.Customers
                            where c.City == "Rio de Janeiro"
                            select c;
                foreach (var cust in custs)
                {
                    Console.WriteLine("{0}", cust.CompanyName);
                }
            }
        }  
    }

    Thanks.

    • Moved by Liliane Teng Tuesday, November 23, 2010 2:58 AM Please post on appropriate forum for better support (From:Visual Basic Interop and Upgrade)
    Tuesday, November 16, 2010 5:09 PM

Answers

  • I would post your question to the Visual C# forum, or perhaps a moderator can move it there.

    This forum is for Visual Basic Interop and Upgrage.


    Paul ~~~~ Microsoft MVP (Visual Basic)
    • Marked as answer by Arsenk01 Friday, May 6, 2011 7:13 PM
    Tuesday, November 16, 2010 6:06 PM
  • Hello Arsenk01,

    Thanks for your post.

    I have moved your thread to Off-Topic forum. Please repost on appropriate forum as Paul suggested for better support. You could also try LINQ to SQL Forum which mainly discusses this aspect questions. Thanks for your understanding.

    Best regards,
    Liliane
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg@microsoft.com


    Please mark the replies as answers if they help and unmark them if they provide no help. Welcome to the All-In-One Code Framework! If you have any feedback, please tell us. Thanks
    • Marked as answer by Arsenk01 Friday, May 6, 2011 7:14 PM
    Tuesday, November 23, 2010 3:02 AM

All replies

  • I would post your question to the Visual C# forum, or perhaps a moderator can move it there.

    This forum is for Visual Basic Interop and Upgrage.


    Paul ~~~~ Microsoft MVP (Visual Basic)
    • Marked as answer by Arsenk01 Friday, May 6, 2011 7:13 PM
    Tuesday, November 16, 2010 6:06 PM
  • Hello Arsenk01,

    Thanks for your post.

    I have moved your thread to Off-Topic forum. Please repost on appropriate forum as Paul suggested for better support. You could also try LINQ to SQL Forum which mainly discusses this aspect questions. Thanks for your understanding.

    Best regards,
    Liliane
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg@microsoft.com


    Please mark the replies as answers if they help and unmark them if they provide no help. Welcome to the All-In-One Code Framework! If you have any feedback, please tell us. Thanks
    • Marked as answer by Arsenk01 Friday, May 6, 2011 7:14 PM
    Tuesday, November 23, 2010 3:02 AM