Beispiel #1
0
        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ı!"));
            }
        }
Beispiel #2
0
 public Category GetById(int id)
 {
     return(_categoryDAL.GetById(id));
 }
Beispiel #3
0
        public void Remove(Category entity)
        {
            var data = _category.GetById(a => a.ID == entity.ID);

            _category.Delete(data);
        }
Beispiel #4
0
 public async Task <CategoryDTO> GetById(long id)
 {
     return(_mapper.Map <CategoryDTO>(await _categoryDAL.GetById(id)));
 }