none
Results from query different in client to DBservice.

    General discussion

  • This is my service query:

    [Query]
    public IQueryable<ImportedProduct> GetOtherDbProducts(string connectionString)
    {
        List<ImportedProduct> output = new List<ImportedProduct>();
    
        OtherDbEntities context = null;
        try
        {
            context = new OtherDbEntities(connectionString);
        }
        catch (Exception e)
        {
            throw new Exception("The connection to the database failed.", e);
        }
    
        foreach(OtherDb.Product p in context.Products)
            output.Add(new ImportedProduct()
            {
                Id = p.ProductId,
                Name = p.ProductName,
                ShortName = p.ProductShortName
            });
    
        return output.AsQueryable();
    }


    When I put a break point on the return, I can see the data I expect. However when I put a break point in the Load Operation result I get slightly different results. Some of the rows show 'Unknown' for the Name and '???' for the ShortName. The Id, however, is correct.

    This issue occurs on WCF RIA Service V1.0 SP2 but NOT on SP1

    Wednesday, January 25, 2012 4:41 AM

All replies