C# LINQ Sugesstion required
I am in process of learning LINQ with optimized queries . The following is a method written that queries the standard Northwind database included with MS SQL.  It returns the average price paid per item given a customer ID.  Please review and critique the method as if it exists verbatim in a production environment. Thanks !
 

    public static Decimal getapp(string cid) {
        var ta1 = new NorthwindDataSetTableAdapters.OrdersTableAdapter();
        var ta2 = new NorthwindDataSetTableAdapters.Order_DetailsTableAdapter();
        var ta3 = new NorthwindDataSetTableAdapters.ProductsTableAdapter();
        var ta4 = new NorthwindDataSetTableAdapters.CategoriesTableAdapter();
                                                   
        var dt1 = ta1.GetData(); // SELECT * FROM Orders
        var dt2 = ta2.GetData(); // SELECT * FROM [Order Details]
     
        var customerOrders = dt1.Where(r => r.CustomerID == cid);
        var customerOrderItems = dt2.Where(r => customerOrders.Any(co => (co.OrderID == r.OrderID)));
     
        Decimal totq = Convert.ToDecimal(0.0);
        Decimal totp = Convert.ToDecimal(0.0);
     
        foreach (NorthwindDataSet.Order_DetailsRow dr in dt2) {
            if (customerOrderItems.Any(r => r.ProductID == dr.ProductID)) {
                var product = ta3.GetData().First(r => r.ProductID == dr.ProductID); // ta3.GetData -> SELECT Products.* FROM Products"
                var cagteory = ta4.GetData().First(r => r.CategoryID == product.CategoryID); // ta4.GetData -> SELECT Categories.* FROM Categories
     
                if (cagteory.CategoryName != "Condiments") {
                    totq = totq + dr.Quantity;
                    totp = totp + (dr.UnitPrice * dr.Quantity);
                }
            }
        }
     
        return totp / totq;
    	}
C# LINQ Sugesstion required
===

I am in process of learning LINQ with optimized queries . The following is a method written that queries the standard Northwind database included with MS SQL.  It returns the average price paid per item given a customer ID.  Please review and critique the method as if it exists verbatim in a production environment. Thanks !
 

    public static Decimal getapp(string cid) {
        var ta1 = new NorthwindDataSetTableAdapters.OrdersTableAdapter();
        var ta2 = new NorthwindDataSetTableAdapters.Order_DetailsTableAdapter();
        var ta3 = new NorthwindDataSetTableAdapters.ProductsTableAdapter();
        var ta4 = new NorthwindDataSetTableAdapters.CategoriesTableAdapter();
                                                   
        var dt1 = ta1.GetData(); // SELECT * FROM Orders
        var dt2 = ta2.GetData(); // SELECT * FROM [Order Details]
     
        var customerOrders = dt1.Where(r => r.CustomerID == cid);
        var customerOrderItems = dt2.Where(r => customerOrders.Any(co => (co.OrderID == r.OrderID)));
     
        Decimal totq = Convert.ToDecimal(0.0);
        Decimal totp = Convert.ToDecimal(0.0);
     
        foreach (NorthwindDataSet.Order_DetailsRow dr in dt2) {
            if (customerOrderItems.Any(r => r.ProductID == dr.ProductID)) {
                var product = ta3.GetData().First(r => r.ProductID == dr.ProductID); // ta3.GetData -> SELECT Products.* FROM Products"
                var cagteory = ta4.GetData().First(r => r.CategoryID == product.CategoryID); // ta4.GetData -> SELECT Categories.* FROM Categories
     
                if (cagteory.CategoryName != "Condiments") {
                    totq = totq + dr.Quantity;
                    totp = totp + (dr.UnitPrice * dr.Quantity);
                }
            }
        }
     
        return totp / totq;
    	}