예제 #1
0
        /// <summary>
        /// Use in a combination with CommitChanges.
        /// </summary>
        protected async Task SetChangesToDbContext(object any, string task = SharedConstants.TaskInsert)
        {
            switch (task)
            {
            case SharedConstants.TaskInsert:
                await _dbContext.AddAsync(any);

                break;

            case SharedConstants.TaskUpdate:
                _dbContext.Update(any);
                break;

            default:
                _dbContext.Remove(any);
                break;
            }
        }