public IActionResult Get(int id) { Category single = _CategoryDal.GetById(id); if (single != null && single.Id > 0) { return(Ok(single)); } else { return(NotFound("Aradığınız kayıt bulunamadı!")); } }
public Category GetById(int id) { return(_categoryDAL.GetById(id)); }
public void Remove(Category entity) { var data = _category.GetById(a => a.ID == entity.ID); _category.Delete(data); }
public async Task <CategoryDTO> GetById(long id) { return(_mapper.Map <CategoryDTO>(await _categoryDAL.GetById(id))); }