public bool Insert(Blog model) { try { return(blogDal.Insert(model)); } catch (Exception ex) { throw ex; } }
public EntityResult Insert(Blog model) { try { if (_blogDal.Insert(model)) { return(new EntityResult("Başarılı", ResultState.Success)); } else { return(new EntityResult("Hata Oluştu", ResultState.Warning)); } } catch (Exception ex) { return(new EntityResult("Database Hatası " + ex.ToInnestException().Message, ResultState.Error)); } }
public void Add(Blog blog) { _blogDal.Insert(blog); }