public IActionResult GetAllByAttribute(Attribute attribute) { var AllObj = _unitOfWork.EmployeeAttribute.GetAll(includeProperties: "Employee,Attribute").ToList(); var result = AllObj.Where(u => u.EMPATTR_AttributeID == attribute.ATTR_ID); return(Json(new { data = result })); }
public void Update(Attribute attribute) { var objFromDb = _db.Attribute.FirstOrDefault(s => s.ATTR_ID == attribute.ATTR_ID); if (objFromDb != null) { objFromDb.ATTR_Name = attribute.ATTR_Name; objFromDb.ATTR_Value = attribute.ATTR_Value; } }