Beispiel #1
0
        public async Task <bool> CreateAsync(PedestrianDetailRequest request)
        {
            var           copier       = new ClassValueCopier();
            PedestrianLog newChildPart = copier.ConvertAndCopy <PedestrianLog, PedestrianDetailRequest>(request);

            return(await _pedestrianLog.AddAsync(newChildPart));
        }
Beispiel #2
0
        public async Task <bool> AddAsync(PedestrianLog document)
        {
            try
            {
                Random _rdm = new Random();
                int    id2  = _rdm.Next(000000, 1000000);
                int    id1  = Convert.ToInt32(DateTime.Now.ToString("mmssff"));
                var    id   = id1 | id2;

                document.Code = _collectionCodePrefix + id.ToString();
                await _context.PedestrianLogCollection.InsertOneAsync(document);

                return(true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #3
0
 public Task <bool> UpdateAsync(PedestrianLog document)
 {
     throw new NotImplementedException();
 }