Esempio n. 1
0
        public async Task <bool> Remove(int _id)
        {
            Supplier item = await context.Supplier.Where(i => i.Id == _id).FirstOrDefaultAsync();

            if (item == default(Supplier))
            {
                return(false);
            }
            item.IsDeleted = true;
            context.Entry(item).Property(x => x.IsDeleted).IsModified = true;
            await context.SaveChangesAsync();

            return(true);
        }
        public async Task <bool> Remove(int _id)
        {
            ExpenditureDocketDetail item = await context.ExpenditureDocketDetail.Where(i => i.Id == _id).FirstOrDefaultAsync();

            if (item == default(ExpenditureDocketDetail))
            {
                return(false);
            }
            item.IsDeleted = true;
            context.Entry(item).Property(x => x.IsDeleted).IsModified = true;
            await context.SaveChangesAsync();

            return(true);
        }