Skip to content
This repository has been archived by the owner on May 26, 2021. It is now read-only.

A document database emulator on top of Microsoft SQL Server XML columns

License

Notifications You must be signed in to change notification settings

rogeralsing/linq-to-sqlxml

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Linq to SqlXml

A document database emulator on top of Microsoft SQL Server XML columns.

Version Alpha 0.1

Linq to SqlXml allows you to persist and read POCO entities to and from the Sql Server using XML type column.

Entities can be queried and projected using Linq.

This Linq query:

var query = (
    from order in ctx.GetCollection<Order>().AsQueryable()
    where order.OrderTotal > 0
    where order.ShippingDate != null
    where order.ShippingAddress.Line1 != "foo" && order.ShippingAddress.Line1 != "bar"
    where order.Status == OrderStatus.Confirmed
    select order
    ).Take(100);

Will be transformed into:

select top 100 Id,DocumentData 
from Documents 
where CollectionName = 'Order' and 
(documentdata.exist('/document[

     Status[. = xs:int(1)] and 
     ShippingAddress/Line1[. != "foo" and . != "bar"] and 
     ShippingDate/@type[.!="null"] and 
     OrderTotal[. > xs:decimal(0)]

]')) = 1 

About

A document database emulator on top of Microsoft SQL Server XML columns

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 64.7%
  • C# 35.0%
  • Classic ASP 0.3%