示例#1
0
        public BucketListEntry Create(string descripion, EntryDifficulty difficulty)
        {
            BucketListEntry entry = new BucketListEntry
            {
                CreatedDate = DateTime.Now,
                Description = descripion,
                Difficulty  = difficulty
            };

            int result = this._db.Insert(entry);

            return(result > 0 ? entry : null);
        }
        public BucketListEntry Create(string descripion, EntryDifficulty difficulty)
        {
            BucketListEntry entry = new BucketListEntry
            {
                CreatedDate = DateTime.Now,
                Description = descripion,
                Difficulty = difficulty
            };

            int result = this._db.Insert(entry);

            return result > 0 ? entry : null;
        }
示例#3
0
        public bool Check(int entryId)
        {
            BucketListEntry foundEntry = this._db.Find <BucketListEntry>(entryId);

            if (foundEntry == null || foundEntry.CheckedDate.HasValue)
            {
                return(false);
            }

            foundEntry.CheckedDate = DateTime.Now;
            int updated = this._db.Update(foundEntry);

            return(updated > 0);
        }