示例#1
0
        public static string GetSelectRowByPrimaryKey(DbEntityInfo entityInfo, params SqlFilter[] filters)
        {
            List <SqlFilter> filterList = new List <SqlFilter>(3);

            foreach (var k in entityInfo.PrimaryKeyColumns)
            {
                var filter = filters.First(f => f.Column.Equals(k.Name, StringComparison.OrdinalIgnoreCase));
                filterList.Add(filter);
            }
            return(GetWhereString(filterList.ToArray()));
        }
示例#2
0
 protected SqlDataContextBase(DbEntityInfo info)
 {
     EntityInfo = info;
 }