-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathAlbumDataAccess.cs
More file actions
34 lines (28 loc) · 945 Bytes
/
AlbumDataAccess.cs
File metadata and controls
34 lines (28 loc) · 945 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using Dapper;
using Microsoft.Extensions.Configuration;
using SamSmithNZ.Service.DataAccess.Base;
using SamSmithNZ.Service.DataAccess.FooFighters.Interfaces;
using SamSmithNZ.Service.Models.FooFighters;
using System.Collections.Generic;
using System.Data;
using System.Threading.Tasks;
namespace SamSmithNZ.Service.DataAccess.FooFighters
{
public class AlbumDataAccess : BaseDataAccess<Album>, IAlbumDataAccess
{
public AlbumDataAccess(IConfiguration configuration)
{
SetupConnectionString(configuration);
}
public async Task<List<Album>> GetList()
{
return await GetList("FFL_GetAlbums");
}
public async Task<Album> GetItem(int albumCode)
{
DynamicParameters parameters = new();
parameters.Add("@albumCode", albumCode, DbType.Int32);
return await GetItem("FFL_GetAlbums", parameters);
}
}
}