示例#1
0
        public override List <TEntity> GetMany(IEnumerable <TKey> ids, params Expression <Func <TEntity, object> >[] properties)
        {
            if (ids == null || !ids.Any())
            {
                return(new List <TEntity>());
            }

            var _ = new QueryParams();

            return(Select().Include(properties).Where($"{Table.PrimaryKey} IN ({_.AddAsArray(ids.ToArray())})").ToList(_));
        }
示例#2
0
        public override int DeleteMany(params TKey[] ids)
        {
            if (ids == null || !ids.Any())
            {
                return(0);
            }

            var _ = new QueryParams();

            return(Delete().Where($"{Table.PrimaryKey.Reference} IN ({_.AddAsArray(ids)})").Execute(_));
        }