Exemple #1
0
        public async Task <TEntity> Delete(int Id)
        {
            var entity = await Get(Id);

            if (entity == null)
            {
                return(entity);
            }
            entity.DeleteDate = DateTimeOffset.Now;
            entity.IsDelete   = true;
            _myContext.Entry(entity).State = EntityState.Modified;
            await _myContext.SaveChangesAsync();

            return(entity);
        }