public void CreateNew(PalindromeViewModel viewmodel)
        {
            if (FetchExistingRecordByPalindrome(viewmodel.PalindromeValue) == null)
            {
                var palindrome = new Models.Palindrome()
                {
                    PalindromeValue = viewmodel.PalindromeValue,
                    CreateTS        = DateTime.Now,
                    PalindromeId    = Guid.NewGuid()
                };

                _datacontext.Create(palindrome);
            }
        }
Beispiel #2
0
 public void Create(Models.Palindrome entity)
 {
     _context.Palindromes.Add(entity);
     _context.SaveChanges();
 }
Beispiel #3
0
 public void Create(Models.Palindrome entity)
 {
     samplePalindromes.Add(entity);
 }