This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.Data.Edm; | |
using System; | |
using System.Collections.Generic; | |
using System.ServiceModel; | |
using System.Web.Http; | |
using System.Web.Http.OData.Builder; | |
using System.Web.Http.OData.Formatter; | |
using System.Web.Http.SelfHost; | |
namespace ConsoleApplication1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Net.Http; | |
using System.Net.Http.Headers; | |
using System.Web.Http; | |
using System.Web.Http.OData; | |
using System.Web.Http.OData.Builder; | |
using System.Web.Http.OData.Formatter; | |
namespace Application | |
{ | |
public class Program |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Net; | |
using System.Net.Http; | |
using System.Reflection; | |
using System.ServiceModel; | |
using System.Web.Http; | |
using System.Web.Http.OData; | |
using System.Web.Http.OData.Builder; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AsyncQueryableAttribute : ActionFilterAttribute | |
{ | |
private static readonly MethodInfo _bufferAsync = typeof(AsyncQueryableAttribute).GetMethod("BufferAsyncCore", BindingFlags.NonPublic | BindingFlags.Static); | |
private readonly QueryableAttribute _innerFilter = new QueryableAttribute(); | |
// this method is copied from ActionFilterAttribute | |
public async Task<HttpResponseMessage> ExecuteActionFilterAsync( | |
HttpActionContext actionContext, | |
CancellationToken cancellationToken, | |
Func<Task<HttpResponseMessage>> continuation) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Data.Entity; | |
using System.Linq; | |
namespace QueryTests | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net.Http; | |
using System.Web.Http; | |
using System.Web.Http.OData; | |
using System.Web.Http.OData.Builder; | |
using Microsoft.Data.Edm; | |
using Microsoft.Data.OData; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net.Http; | |
using System.Net.Http.Headers; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using System.Web.Http; | |
using System.Web.Http.Hosting; | |
using System.Web.Http.OData; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static IEdmModel GetEdmModel(this DbContext context) | |
{ | |
using (MemoryStream stream = new MemoryStream()) | |
{ | |
using (XmlWriter writer = XmlWriter.Create(stream)) | |
{ | |
EdmxWriter.WriteEdmx(context, writer); | |
writer.Close(); | |
stream.Seek(0, SeekOrigin.Begin); | |
using (XmlReader reader = XmlReader.Create(stream)) |
OlderNewer