Ejemplo n.º 1
0
        public override int Delete <T>(DocumentQuery query)
        {
            var list = ReadList <T>(query);

            int numberOfRows = list.Count;

            if (numberOfRows == 0)
            {
                return(0);
            }

            using (var writer = new DocumentWriter <T>(this, query.TypeOf))
            {
                writer.DeleteDocuments(list);
                writer.SubmitChanges();
            }

            return(numberOfRows);
        }