/// <summary> /// Retrieves a single item by its id. /// </summary> /// <param name="id">The id.</param> /// <returns></returns> public WLTableMessagesDto GetOne(long id) { try { return(new WLTableMessagesDb(ConnectionFactory.MainMySql).Read(id)); } catch (StoreProcException ex) { throw BusinessExceptionFactory.CreateNew(ex); } }
internal void DoDelete(long id) { try { new WLTableMessagesDb(ConnectionFactory.MainMySql).Delete(id); } catch (StoreProcException ex) { throw BusinessExceptionFactory.CreateNew(ex); } }
/// <summary> /// Gets the filtered collection from the underlying table. /// </summary> /// <param name="filter">The filter.</param> /// <returns></returns> public WLTableMessagesCollection GetFiltered(WLTableMessagesFilter filter) { try { return(new WLTableMessagesDb(ConnectionFactory.MainMySql).ReadAll(filter)); } catch (StoreProcException ex) { throw BusinessExceptionFactory.CreateNew(ex); } }
/// <summary> /// Retrieves all items from the underlying table. /// </summary> /// <returns></returns> public WLTableCollection GetAll() { try { return(new WLTableDb(ConnectionFactory.MainMySql).ReadAll(null)); } catch (StoreProcException ex) { throw BusinessExceptionFactory.CreateNew(ex); } }
internal long DoSave(WLTableMessagesDto dto) { try { new WLTableMessagesDb(ConnectionFactory.MainMySql).Save(dto); } catch (StoreProcException ex) { throw BusinessExceptionFactory.CreateNew(ex); } return(dto.WLTableId); }