public List <Mail> GetAll() { try { getDatalayer = new LiteDbSendMailDataMapper(); var data = getDatalayer.GetAll(); return(data); } catch (Exception ex) { throw new Exception(ex.Message.ToString()); } }
public bool Update(Mail item) { try { getDatalayer = new LiteDbSendMailDataMapper(); if (item != null && item.Id > 0) { getDatalayer.Update(item); } return(true); } catch (Exception ex) { throw new Exception(ex.Message.ToString()); } }
public bool Insert(Mail item) { try { getDatalayer = new LiteDbSendMailDataMapper(); if (item != null) { getDatalayer.Insert(item); } return(true); } catch (Exception ex) { throw new Exception(ex.Message.ToString()); } }