File tree 6 files changed +12
-24
lines changed
6 files changed +12
-24
lines changed Original file line number Diff line number Diff line change 211
211
</Compile >
212
212
<Compile Include =" Models\Banner.cs" />
213
213
<Compile Include =" DataTransferObjects\BannerDTO.cs" />
214
- <Compile Include =" DataTransferObjects\BannerHtmlDTO.cs" />
215
214
<Compile Include =" Properties\AssemblyInfo.cs" />
216
215
<Compile Include =" Repositories\BannerRepository.cs" />
217
216
<Compile Include =" Repositories\IBannerRepository.cs" />
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ public BannerDTO Get(int id)
58
58
// POST api/banners
59
59
[ Route ( "" ) ]
60
60
[ HttpPost ]
61
- public HttpResponseMessage Post ( BannerHtmlDTO value )
61
+ public HttpResponseMessage Post ( BannerDTO value )
62
62
{
63
63
HttpResponseMessage result = null ;
64
64
@@ -78,11 +78,10 @@ public HttpResponseMessage Post(BannerHtmlDTO value)
78
78
return result ;
79
79
}
80
80
81
-
82
81
// PUT api/banners/id
83
82
[ Route ( "{id:int}" ) ]
84
83
[ HttpPut ]
85
- public HttpResponseMessage Update ( int id , BannerHtmlDTO value )
84
+ public HttpResponseMessage Update ( int id , BannerDTO value )
86
85
{
87
86
HttpResponseMessage result = null ;
88
87
Original file line number Diff line number Diff line change @@ -21,5 +21,9 @@ public BannerDTO(Banner banner)
21
21
this . Modified = banner . Modified ;
22
22
}
23
23
24
+ public BannerDTO ( )
25
+ {
26
+
27
+ }
24
28
}
25
29
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ public BannerService()
24
24
}
25
25
26
26
// Add an entry logic
27
- public Banner Add ( BannerHtmlDTO data )
27
+ public Banner Add ( BannerDTO data )
28
28
{
29
29
if ( ! HtmlValidator . Validate ( data . Html ) )
30
30
{
@@ -65,7 +65,7 @@ public BannerDTO Get(int id)
65
65
66
66
67
67
// Edit an entry logic
68
- public Banner Update ( int id , BannerHtmlDTO data )
68
+ public Banner Update ( int id , BannerDTO data )
69
69
{
70
70
if ( ! HtmlValidator . Validate ( data . Html ) )
71
71
{
@@ -103,10 +103,10 @@ public void Delete(int id)
103
103
}
104
104
105
105
// Returns an HTML of a specified banner
106
- public BannerHtmlDTO GetHtml ( int id )
106
+ public BannerDTO GetHtml ( int id )
107
107
{
108
108
Banner banner = repository . Get ( id ) ;
109
- BannerHtmlDTO value = new BannerHtmlDTO ( ) ;
109
+ BannerDTO value = new BannerDTO ( ) ;
110
110
value . Html = HttpUtility . HtmlDecode ( banner . Html ) ;
111
111
112
112
return value ;
Original file line number Diff line number Diff line change @@ -10,10 +10,10 @@ namespace BannerFlow.Services
10
10
{
11
11
public interface IBannerService
12
12
{
13
- Banner Add ( BannerHtmlDTO data ) ;
13
+ Banner Add ( BannerDTO data ) ;
14
14
IEnumerable < BannerDTO > GetAll ( ) ;
15
15
BannerDTO Get ( int id ) ;
16
- Banner Update ( int id , BannerHtmlDTO data ) ;
16
+ Banner Update ( int id , BannerDTO data ) ;
17
17
void Delete ( int id ) ;
18
18
}
19
19
}
You can’t perform that action at this time.
0 commit comments