Exemple #1
0
        public override AutoNumber InsertOrUpdate(AutoNumber entity)
        {
            var autoNumber = AutoNumbers.GetAll().FirstOrDefault(i => i.Date == entity.Date);

            if (autoNumber == null)
            {
                autoNumber = AutoNumbers.Add(autoNumber);
            }
            else
            {
                AutoNumbers.Remove(autoNumber);
                autoNumber = AutoNumbers.Add(entity);
            }
            return(autoNumber);
        }
Exemple #2
0
 public override AutoNumber Insert(AutoNumber entity)
 {
     return(AutoNumbers.Add(entity));
 }