Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public List<BlobDetails> GetAllBlobsNames()
- {
- RichTekstModelDataContext dc = new RichTekstModelDataContext();
- var allBlobs = from b in dc.Blobs
- orderby b.RowVersion descending
- select new {b.Id, b.Size, b.Signature, b.RowVersion};
- ---> allBlobs.ToList<BlobDetails>();
- }
- public class BlobDetails
- {
- public int Id { get; set; }
- public string Signature { get; set; }
- public int Size { get; set; }
- public System.Data.Linq.Binary RowVersion { get; set; }
- }
- var qry = from b in dc.Blobs
- orderby b.RowVersion descending
- select new BlobDetails {
- Id = b.Id, Size = b.Size,
- Signature = b.Signature, RowVersion = b.RowVersion};
- return qry.ToList();
- var qry = from b in dc.Blobs
- orderby b.RowVersion descending
- select new {b.Id, b.Size, b.Signature, b.RowVersion};
- var typedQry = from b in qry.AsEnumerable()
- select new BlobDetails {
- Id = b.Id, Size = b.Size,
- Signature = b.Signature, RowVersion = b.RowVersion};
- return typedQry.ToList();
- var allBlobs = from b in dc.Blobs
- orderby b.RowVersion descending
- select new BlobDetails {Id = b.Id, .... };
- allBlobs.ToList();
Add Comment
Please, Sign In to add comment