Put interface behind database provider for testing. Use state object to get data from database, then map to model.
This commit is contained in:
parent
5a0d0933ce
commit
20ccdd07f1
11 changed files with 118 additions and 34 deletions
19
Website/Data/States/BlogPostState.cs
Normal file
19
Website/Data/States/BlogPostState.cs
Normal file
|
@ -0,0 +1,19 @@
|
|||
using System;
|
||||
using Dapper.Contrib.Extensions;
|
||||
|
||||
namespace Website.Data.States
|
||||
{
|
||||
[Table("blog_posts")]
|
||||
public class BlogPostState
|
||||
{
|
||||
[Key]
|
||||
public int Post_Id { get; set; }
|
||||
public string Post_Title { get; set; }
|
||||
public string Post_Content { get; set; }
|
||||
public DateTime Post_Timestamp { get; set; }
|
||||
public string Post_Draft { get; set; }
|
||||
public string Post_Url { get; set; }
|
||||
public bool Post_Deleted{ get; set; }
|
||||
public int User_Id { get; set; }
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue