Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
two more APIs
- Loading branch information
Jeremy Mill
committed
Dec 8, 2015
1 parent
9da7ec1
commit 5c6a5e0
Showing
4 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
TeamDBAwesome/TeamDBAwesome/Controllers/AddGenreController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,22 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Net; | |||
using System.Net.Http; | |||
using System.Web.Http; | |||
using TeamDBAwesome.SqlService; | |||
|
|||
namespace TeamDBAwesome.Controllers | |||
{ | |||
public class AddGenreController : ApiController | |||
{ | |||
public HttpResponseMessage Get(string GenreName) | |||
{ | |||
HttpResponseMessage message = new HttpResponseMessage(HttpStatusCode.OK); | |||
MySqlService sql = new MySqlService(); | |||
int newArtist = sql.AddGenre(GenreName); | |||
message.Content = new StringContent(newArtist.ToString()); | |||
return message; | |||
} | |||
} | |||
} |
22 changes: 22 additions & 0 deletions
22
TeamDBAwesome/TeamDBAwesome/Controllers/AddMediaTypeController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,22 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Net; | |||
using System.Net.Http; | |||
using System.Web.Http; | |||
using TeamDBAwesome.SqlService; | |||
|
|||
namespace TeamDBAwesome.Controllers | |||
{ | |||
public class AddMediaTypeController : ApiController | |||
{ | |||
public HttpResponseMessage Get(string TypeName) | |||
{ | |||
HttpResponseMessage message = new HttpResponseMessage(HttpStatusCode.OK); | |||
MySqlService sql = new MySqlService(); | |||
int newArtist = sql.AddMediaType(TypeName); | |||
message.Content = new StringContent(newArtist.ToString()); | |||
return message; | |||
} | |||
} | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters