Esempio n. 1
0
 /// <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);
     }
 }
Esempio n. 2
0
 internal void DoDelete(long id)
 {
     try
     {
         new WLTableMessagesDb(ConnectionFactory.MainMySql).Delete(id);
     }
     catch (StoreProcException ex)
     {
         throw BusinessExceptionFactory.CreateNew(ex);
     }
 }
Esempio n. 3
0
 /// <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);
     }
 }
Esempio n. 4
0
 /// <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);
     }
 }
Esempio n. 5
0
 internal long DoSave(WLTableMessagesDto dto)
 {
     try
     {
         new WLTableMessagesDb(ConnectionFactory.MainMySql).Save(dto);
     }
     catch (StoreProcException ex)
     {
         throw BusinessExceptionFactory.CreateNew(ex);
     }
     return(dto.WLTableId);
 }