Ejemplo n.º 1
0
        public async Task <bool> AddAsync(core.Completion Completion)
        {
            if (await CompletionExists(Completion.UNITID))
            {
                return(false);
            }
            var newCompletion = Completion.ToDataObject();

            _context.Completion.Add(newCompletion);
            return(_context.ChangeTracker.HasChanges());
        }
Ejemplo n.º 2
0
        public async Task <bool> UpdateAsync(core.Completion Completion)
        {
            if (!await CompletionExists(Completion.UNITID))
            {
                return(false);
            }
            var upCompletion = Completion.ToDataObject();

            _context.Completion.Update(upCompletion);

            _context.Update(upCompletion);
            return(_context.ChangeTracker.HasChanges());
        }