Exemplo n.º 1
0
        public bool deleteUnit(Units unit)
        {
            //var confirm = (from u in _unitOfWork.units.getData()
            //               join j in _unitOfWork.jobs.getData() on unit.unitId equals j.unitId
            //               select new
            //               {
            //                   units = u,
            //                   jobs = j
            //               });
            //var count = confirm.ToList();

            //Units obj = db.units.Find(unit.unitId);
            //db.units.Remove(obj);
            //db.SaveChanges();
            //message = "done";
            _unitsRepository.deleteById(unit.unitId);
            _unitOfWork.Commit();
            return(true);
        }