public JsonExpression(string json, ISecureRepository db = null) { JavaScriptSerializer js = new JavaScriptSerializer(); Values = (IDictionary <string, object>)js.Deserialize(json, typeof(Dictionary <string, object>)); this.Repository = db; }
/// <summary> /// /// </summary> /// <param name="q"></param> /// <param name="repository"></param> /// <param name="count"></param> public AtomQueryableResult(IQueryable <T> q, ISecureRepository repository, long count = 0) { Query = q; Total = count; this.Repository = repository; if (repository != null) { this.SecurityContext = repository.SecurityContext; } }
public JsonExpression(IDictionary <string, object> values, ISecureRepository db = null) { this.Values = values; this.Repository = db; }
public static IQueryable <T> WhereJsonQuery <T>(this IQueryable <T> q, string query, ISecureRepository repository = null) { JsonExpression <T> exp = new JsonExpression <T>(query, repository); var e = exp.Parse(); if (e == null) { return(q); } return(q.Where(e)); }