public ProcessResult Delete(int id) { ProcessResult result = new ProcessResult(); DAL.Extensions.DataBaseResult delete = _cityDal.Delete(id); switch (delete) { case DAL.Extensions.DataBaseResult.Success: result.Result = Extensions.BLLResult.Success; result.Errors.Add(Extensions.SuccessProcess); break; case DAL.Extensions.DataBaseResult.Referanced: result.Result = Extensions.BLLResult.Referanced; result.Errors.Add("İl başka tablolar üzerinde refere edildiğinden silinemedi"); break; case DAL.Extensions.DataBaseResult.NotFound: result.Result = Extensions.BLLResult.NotFound; result.Errors.Add(Extensions.NotFound); break; case DAL.Extensions.DataBaseResult.Error: result.Result = Extensions.BLLResult.InnerException; result.Errors.Add(Extensions.InnerException); break; case DAL.Extensions.DataBaseResult.ServerDisable: result.Result = Extensions.BLLResult.ServerDisable; result.Errors.Add(Extensions.ServerDisable); break; case DAL.Extensions.DataBaseResult.AlreadyFound: break; default: throw new ArgumentOutOfRangeException(); } return(result); }
public void Delete(City entity) { _cityDAL.Delete(entity); }
public bool DeleteByID(int entityID) { City deleted = GetByID(entityID); return(_cityDal.Delete(deleted) > 0); }
public void Detele(int id) { _context.Delete(new City { Id = id }); }
public bool Delete(City model) { return(_cityDAL.Delete(model) > 0); }