You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.3 KiB
C#
47 lines
1.3 KiB
C#
3 years ago
|
using Common.Library.SQL.MySQL;
|
||
|
using System;
|
||
|
using System.Data;
|
||
|
using Common.Library.DataLayer.DTO.Websites.JasonNeumannAudio.com;
|
||
|
|
||
|
|
||
|
namespace Common.Library.DataLayer.DAO.Websites.JasonNeumannAudio.com
|
||
|
{
|
||
|
public class ServicesDAO : MySQL
|
||
|
{
|
||
|
public ServicesDAO(DBConnectionInformation connectionInformation) : base(connectionInformation){ }
|
||
|
|
||
|
public ServicesDTOCollection GetServices()
|
||
|
{
|
||
|
InitConnection();
|
||
|
ServicesDTOCollection items = new();
|
||
|
|
||
|
try
|
||
|
{
|
||
|
DBCommand.CommandType = CommandType.StoredProcedure;
|
||
|
DBCommand.CommandText = "services_page_select_all";
|
||
|
DBReader = DBCommand.ExecuteReader();
|
||
|
|
||
|
while(DBReader.Read())
|
||
|
{
|
||
|
ServicesDTO item = new()
|
||
|
{
|
||
|
ServicePageID = GetInt("ServicePageID").Value,
|
||
|
ServiceText = GetString("ServiceText")
|
||
|
};
|
||
|
|
||
|
items.Add(item);
|
||
|
}
|
||
|
|
||
|
return items.Count == 0 ? null : items;
|
||
|
}
|
||
|
catch(Exception)
|
||
|
{
|
||
|
throw;
|
||
|
}
|
||
|
finally
|
||
|
{
|
||
|
DisposeConnection();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|