Esempio n. 1
0
        /// <summary>
        /// Asynchronously clears the landmark identified by the provided <paramref name="id" />.
        /// </summary>
        /// <param name="id">The identifier of the landmark.</param>
        /// <returns></returns>
        public async Task ClearLandmark(int id)
        {
            var landmark = _dataContext.Landmarks.FirstOrDefault(l => l.Id == id);

            if (landmark != null)
            {
                landmark.Expiry = DateTimeOffset.Now.AddDays(-1);

                await _dataContext.SaveChangesAsync();
            }
        }