예제 #1
0
        public async Task <bool> InsertNotificationLinkAsync(NotificationLink notificationLink)
        {
            bool result = false;

            try
            {
                var tracking = _databaseContext.Add(notificationLink);
                await _databaseContext.SaveChangesAsync();

                result = tracking.State == EntityState.Added;
                return(result);
            }
            catch (Exception)
            {
                return(result);
            }
        }
예제 #2
0
        public async Task <bool> InsertReminderAsync(Reminder reminder)
        {
            bool result = false;

            try
            {
                var tracking = _databaseContext.Add(reminder);
                await _databaseContext.SaveChangesAsync();

                result = tracking.State == EntityState.Added;
                return(result);
            }
            catch (Exception)
            {
                return(result);
            }
        }