Add basic blog repo and models to test potential project structure
This commit is contained in:
parent
7703f9d8bb
commit
19c3c49f4d
10 changed files with 91 additions and 3 deletions
14
Website/Data/BlogRepository.cs
Normal file
14
Website/Data/BlogRepository.cs
Normal file
|
@ -0,0 +1,14 @@
|
|||
using System.Threading.Tasks;
|
||||
using Website.Models;
|
||||
|
||||
namespace Website.Data
|
||||
{
|
||||
public class BlogRepository
|
||||
{
|
||||
private readonly DatabaseProvider _dbProvider;
|
||||
|
||||
public BlogRepository(DatabaseProvider dbProvider) => _dbProvider = dbProvider;
|
||||
|
||||
public Task<BlogPost> GetPost(int id) => Task.Run(() => new BlogPost{Id=id});
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue