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
// Add a student to the list | |
[HttpPost("AddStudent")] | |
public HttpResponseMessage AddStudent(string student) | |
{ | |
if(!string.IsNullOrWhiteSpace(student)) | |
{ | |
Student newStud = JsonConvert.DeserializeObject<Student>(student); | |
DataService.AddStudent(newStud); | |
return new HttpResponseMessage(HttpStatusCode.OK); |
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
// Add a student to the list | |
public async Task<bool> AddStudent(Student student) | |
{ | |
StringContent serializedObj = new StringContent(JsonConvert.SerializeObject(student)); | |
var response = await _client.PostAsync("AddStudent", serializedObj); | |
return response.IsSuccessStatusCode; | |
} |
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
$(button1).click(function() { | |
$(button2).click(function() { | |
$(button3).click(function() { | |
$(button4).click(function() { | |
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
public IQueryable<Post> GetCategories() | |
{ | |
var query = (from p in Post | |
select new Post | |
{ | |
Category = p.Category, | |
}).Distinct(); | |
return query; | |
} |
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
public IQueryable<Post> GetPost() | |
{ | |
var query = (from p in Post | |
select new Post | |
{ | |
Id = p.Id, | |
Header = p.Header, | |
Text = p.Text, | |
DateCreated = p.DateCreated, | |
Thumbnail = p.Thumbnail, |
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
public IActionResult Main(Game game, string next) | |
{ | |
string Name = "The Chief"; | |
var messageList = new Dictionary<int, string>(); | |
messageList.Add(1, "TEXT1"); | |
messageList.Add(2, "TEXT2"); | |
messageList.Add(3, "TEXT3"); | |
var getChar = _context.GetCharacter(Name); |
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
Expected: | |
Image1.jpg | |
Image2.jpg | |
Actual: | |
Image1.jpg |
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
[Id] INT NOT NULL, | |
[Name] VARCHAR (50) NOT NULL, | |
[Description] VARCHAR (50) NOT NULL, | |
PRIMARY KEY CLUSTERED ([Id] ASC) |