Esempio n. 1
0
        public Resp_Binary Add_Batch(IEnumerable <LayoutDTO> models)
        {
            if (models.Count() < 5000)
            {
                BulkOperation <Layout> .MySqlBulkInsert(models.GetPrototype <LayoutDTO, Layout>(), _repository);
            }
            else
            {
                BulkOperation <Layout> .MySqlBulkInsertAsync(models.GetPrototype <LayoutDTO, Layout>(), _repository);
            }

            return(Resp_Binary.Add_Sucess);
        }
Esempio n. 2
0
        public Resp_Binary Add_Batch(IEnumerable <RecordManagerDTO> models)
        {
            if (models.Count() < 5000)
            {
                BulkOperation <RecordManager> .MySqlBulkInsert(models.GetPrototype <RecordManagerDTO, RecordManager>(), _repository);
            }
            else
            {
                BulkOperation <RecordManager> .MySqlBulkInsertAsync(models.GetPrototype <RecordManagerDTO, RecordManager>(), _repository);
            }


            _repository.DelRepeatRecord();
            return(Resp_Binary.Add_Sucess);
        }