public Task <int> DeleteByPropertyAsync <TModel, TProperty>(Expression <Func <TModel, TProperty> > propertySelector, TModel model) where TModel : BaseEntity
        {
            var propertyNames = new List <string> {
                GetPropertyNameFromExpression(propertySelector)
            };
            string sql = SQLBuilderHelper.BuildDeleteSqlByProperty(model, propertyNames, this.GetORMDBType());

            return(this.ExcuteAsync(sql, model));
        }
Exemplo n.º 2
0
        public int DeleteByProperty <TModel, TProperty1, TProperty2>(Expression <Func <TModel, TProperty1> > propertySelector1, Expression <Func <TModel, TProperty2> > propertySelector2, TModel model) where TModel : BaseEntity
        {
            var propertyNames = new List <string> {
                GetPropertyNameFromExpression(propertySelector1),
                GetPropertyNameFromExpression(propertySelector2)
            };
            string sql = SQLBuilderHelper.BuildDeleteSqlByProperty(model, propertyNames, this.GetORMDBType());

            return(this.Excute(sql, model));
        }