Exemplo n.º 1
0
        public int BulkUpdate(List <T> datas, string [] wherColumns, string [] updateColumns)
        {
            List <GroupModel> groupModels;
            int result;

            GroupDataList(datas, out groupModels, out result);
            foreach (var item in groupModels.GroupBy(it => it.GroupName))
            {
                var addList = item.Select(it => it.Item).ToList();
                result += FastestProvider.AS(item.Key).BulkUpdate(addList, wherColumns, updateColumns);;
            }
            return(result);
        }
Exemplo n.º 2
0
        public int BulkUpdate(List <T> datas)
        {
            List <GroupModel> groupModels;
            int result;

            GroupDataList(datas, out groupModels, out result);
            foreach (var item in groupModels.GroupBy(it => it.GroupName))
            {
                CreateTable(item.Key);
                var addList = item.Select(it => it.Item).ToList();
                result += FastestProvider.AS(item.Key).BulkUpdate(addList);
                this.Context.MappingTables.Add(EntityInfo.EntityName, EntityInfo.DbTableName);
            }
            return(result);
        }