mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 15:24:09 +03:00
[CSharp/en]extra details for using EntityFramework and namespaces
This commit is contained in:
parent
f5d0208178
commit
8911f368de
@ -24,19 +24,24 @@ Multi-line comments look like this
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
//public void MethodOrClassOrOtherWithParsableHelp() {}
|
//public void MethodOrClassOrOtherWithParsableHelp() {}
|
||||||
|
|
||||||
// Specify namespaces application will be using
|
// Specify the namespaces this source code will be using
|
||||||
|
// The namespaces below are all part of the standard .NET Framework Class Libary
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data.Entity; // Add dll reference with NuGet: Install-Package EntityFramework
|
|
||||||
using System.Dynamic;
|
using System.Dynamic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Linq.Expressions;
|
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
||||||
// defines scope to organize code into "packages"
|
// But this is one is not:
|
||||||
namespace LearningXInYMinutes.CSharp
|
using System.Data.Entity;
|
||||||
|
// In order to be able to use it, you need to add a dll reference
|
||||||
|
// This can be done with the NuGet package manager: `Install-Package EntityFramework`
|
||||||
|
|
||||||
|
// Namespaces define scope to organize code into "packages" or "modules"
|
||||||
|
// Using this code from another source file: using Learning.CSharp;
|
||||||
|
namespace Learning.CSharp
|
||||||
{
|
{
|
||||||
// Each .cs file should at least contain a class with the same name as the file
|
// Each .cs file should at least contain a class with the same name as the file
|
||||||
// you're allowed to do otherwise, but shouldn't for sanity.
|
// you're allowed to do otherwise, but shouldn't for sanity.
|
||||||
|
Loading…
Reference in New Issue
Block a user