Blog.Logic.Core.EducationLogic.Delete C# (CSharp) Méthode

Delete() public méthode

public Delete ( int educationId ) : bool
educationId int
Résultat bool
        public bool Delete(int educationId)
        {
            try
            {
                var db = _educationRepository.Find(a => a.EducationId == educationId, false).FirstOrDefault();
                if (db == null) return false;

                _educationRepository.Delete(db);
                return true;
            }
            catch (Exception ex)
            {
                throw new BlogException(ex.Message, ex.InnerException);
            }
        }
    }