示例#1
0
        public async Task <bool> DeleteServiceAsync(int id)
        {
            var entity = new Entities.Service
            {
                Id = id
            };

            Context.Entry(entity).State = EntityState.Deleted;
            var result = await Context.SaveChangesAsync();

            return(result > 0);
        }