/
NorthwindApi.cs
45 lines (38 loc) · 1.32 KB
/
NorthwindApi.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using System;
using System.Linq;
using Microsoft.Restier.EntityFramework;
using Microsoft.Restier.Samples.Northwind.AspNet.Data;
namespace Microsoft.Restier.Samples.Northwind.AspNet.Controllers
{
/// <summary>
///
/// </summary>
public partial class NorthwindApi : EntityFrameworkApi<NorthwindEntities>
{
public NorthwindApi(IServiceProvider serviceProvider) : base(serviceProvider)
{
}
/// <summary>
///
/// </summary>
/// <param name="entitySet"></param>
/// <returns></returns>
protected internal IQueryable<Category> OnFilterCategories(IQueryable<Category> entitySet)
{
//TraceEvent("CompanyEmployee", RestierOperationTypes.Filtered);
return entitySet.Take(1);
}
/// <summary>
///
/// </summary>
/// <param name="property"></param>
protected internal void OnInsertingCategory(Category entity)
{
//CompanyEmployeeManager.OnInserting(entity);
//TrackEvent(entity, RestierOperationTypes.Inserting);
#pragma warning disable CA1303 // Do not pass literals as localized parameters
Console.WriteLine("Inserting Category...");
#pragma warning restore CA1303 // Do not pass literals as localized parameters
}
}
}