Download and install VS Code
- Install VS Code from: https://code.visualstudio.com/
Download and install Node
Create a Project Folder & Open VS Code
const int roleIdScript = 1; | |
const int roleIdPencils = 2; | |
context.Roles.AddOrUpdate( | |
r => r.Id, | |
new Role() { Id = roleIdScript, Name = "Script" }, | |
new Role() { Id = roleIdPencils, Name = "Pencils" } | |
); |
public static DataTable GetComicBook(int comicBookId) | |
{ | |
using (var conn = new SqlConnection(ConnectionString)) | |
{ | |
using (var cmd = new SqlCommand($@" | |
SELECT Id, SeriesId, IssueNumber, | |
[Description], PublishedOn, AverageRatng | |
FROM ComicBook | |
WHERE Id = {comicBookId}; | |
", conn)) |
public static ComicBook GetComicBook(int comicBookId) | |
{ | |
using (var context = new Context()) | |
{ | |
return context.ComicBooks | |
.Where(cb => cb.Id == comicBookId) | |
.SingleOrDefault(); | |
} | |
} |
Download and install VS Code
Download and install Node
Create a Project Folder & Open VS Code
/// <summary> | |
/// Represents a physical activity. | |
/// </summary> | |
public class Activity | |
{ | |
/// <summary> | |
/// Constructor for creating activities. | |
/// </summary> | |
public Activity() | |
{ |
using ComicBookLibraryManagerWebApp.ViewModels; | |
using ComicBookShared.Models; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net; | |
using System.Web; | |
using System.Web.Mvc; | |
using System.Data.Entity; |
import { useState, useEffect } from 'react'; | |
function Repositories() { | |
const [repos, setRepos] = useState([]); | |
return ( | |
<> | |
<h2>Repositories</h2> | |
<table> | |
<thead> |
const express = require('express'); | |
// Call the `express` function to create the Express application. | |
const app = express(); | |
// Define a GET route for the path `/`. | |
app.get('/', (req, res) => { | |
// Return a JSON formatted response. | |
res.json({ message: 'Hello world!' }); | |
}); |