Forum Cross Platform with Xamarin

Best way to read rows of data saved in database to pass through web api for my app?

Currently using web API to authenticate users when logging onto the app, but I can't seem to find a way to send a request with the users name and then return all their previous orders from a database. Basically looking for a way to read a column and return all the rows that contain that value.

Best Answer

  • LouissLouiss ✭✭
    Accepted Answer

    End up using this.
    var query = from c in DBo.QuotesReferences
    where c.Customer == newQuote.Customer
    orderby c.Date descending
    select new { c.QuoteID, c.Quantity, c.Code, c.Date };

                    var results = query.Take(25).ToList();
                    string combindedString = string.Join(",", results);
                    return new AllOrderRes { QuoteResponse = combindedString };


Sign In or Register to comment.