c# - Simple Linq to SQL Compiled.query for count -
i have function database count every minute , compile query so. table being written (and deleted from) multiple sources , want gather results on number of unique rows in use throughout day.
my normal linq query is:
var query = result in dcontext.constantly_changing_table select result.used_transaction_id; // i'm looking count of unique used_transaction_id's console.writeline((query.distinct()).count()); how turn compiled query? background. i've been doing linq week , can write complicated join statements it. day 1 on compiled queries , i'm bit lost. i'm not interested in fact may (or may not ) improve performance on query, want see compiled query works can build on.
Comments
Post a Comment