This repository has been archived by the owner on Aug 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added initial migration and moved SML to DB.
- Loading branch information
1 parent
9668f39
commit 518a554
Showing
7 changed files
with
766 additions
and
56 deletions.
There are no files selected for viewing
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
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 | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,29 @@ | ||
using System.Collections.Generic; | ||
using System.Threading.Tasks; | ||
using Gvc.Data.Models; | ||
using Gvc.Web.Contexts; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.EntityFrameworkCore; | ||
|
||
namespace Gvc.Web.Controllers | ||
{ | ||
[Route("api/[controller]")] | ||
[ApiController] | ||
public class AboutController : ControllerBase | ||
{ | ||
private readonly GvcDbContext _gvcDbContext; | ||
|
||
public AboutController( | ||
GvcDbContext gvcDbContext | ||
) | ||
{ | ||
_gvcDbContext = gvcDbContext; | ||
} | ||
|
||
[HttpGet] | ||
public ActionResult GetSocialMedia() | ||
public async Task<ActionResult<IEnumerable<SocialMediaLink>>> GetSocialMediaLinks() | ||
{ | ||
var socialMediaLinks = new List<SocialMediaLink>() | ||
{ | ||
new SocialMediaLink() | ||
{ | ||
Url = "http://bit.ly/2zhCJ4T", | ||
FontAwesomeClass = "fab fa-facebook", | ||
Username = "@gvcayetano" | ||
}, | ||
new SocialMediaLink() | ||
{ | ||
Url = "http://bit.ly/2MB63Ml", | ||
FontAwesomeClass = "fab fa-github", | ||
Username = "@gvcayetano" | ||
}, | ||
new SocialMediaLink() | ||
{ | ||
Url = "http://bit.ly/2PdP9Fz", | ||
FontAwesomeClass = "fab fa-instagram", | ||
Username = "@gvcayetano" | ||
}, | ||
new SocialMediaLink() | ||
{ | ||
Url = "http://bit.ly/2ZpLBQq", | ||
FontAwesomeClass = "fab fa-linkedin", | ||
Username = "@gvcayetano" | ||
}, | ||
new SocialMediaLink() | ||
{ | ||
Url = "http://bit.ly/2HikHUr", | ||
FontAwesomeClass = "fab fa-twitter", | ||
Username = "@gvcayetano" | ||
}, | ||
new SocialMediaLink() | ||
{ | ||
Url = "https://stackshare.io/gvcayetano/my-stack", | ||
FontAwesomeClass = "fas fa-layer-group", | ||
Username = "@gvcayetano" | ||
}, | ||
new SocialMediaLink() | ||
{ | ||
Url = "https://hub.docker.com/u/gvcayetano", | ||
FontAwesomeClass = "fab fa-docker", | ||
Username = "@gvcayetano" | ||
}, | ||
new SocialMediaLink() | ||
{ | ||
Url = "https://www.twitch.tv/iamjayjay", | ||
FontAwesomeClass = "fab fa-twitch", | ||
Username = "@iamjayjay" | ||
} | ||
}; | ||
return Ok(socialMediaLinks); | ||
return await _gvcDbContext.SocialMediaLinks.ToListAsync(); | ||
} | ||
} | ||
} |
255 changes: 255 additions & 0 deletions
255
Gvc.Web/Migrations/20190921020014_InitialCreate.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.