Exemplo n.º 1
0
        /// <summary>
        /// Saves the or update in DB async.
        /// </summary>
        /// <returns>The or update in DB async.</returns>
        /// <param name="item">Item.</param>
        public async Task <bool> SaveOrUpdateInDBAsync(TodoItem item)
        {
            try
            {
                item.LastModified = DateTime.Now;
                await _repo.SaveOrUpdateAsync(item);

                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }