예제 #1
0
        public void DeleteById(string id)
        {
            var objToDelete = Table.ToList().FirstOrDefault(o => o.Id.ToString() == id);

            _context.Remove(objToDelete);
            _context.SaveChanges();
        }
        public void DeleteById(string id)
        {
            Guid gId         = new Guid(id);
            var  objToDelete = Table.ToList().FirstOrDefault(o => o.Id == gId);

            _context.Remove(objToDelete);
            _context.SaveChanges();
        }