Skip to content

Commit 824c426

Browse files
committed
Add clases.
1 parent 11b2016 commit 824c426

4 files changed

Lines changed: 36 additions & 2 deletions

File tree

Agenda/Agenda.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@
132132
<Compile Include="Global.asax.cs">
133133
<DependentUpon>Global.asax</DependentUpon>
134134
</Compile>
135+
<Compile Include="Models\Contacto.cs" />
136+
<Compile Include="Models\Telefono.cs" />
135137
<Compile Include="Properties\AssemblyInfo.cs" />
136138
</ItemGroup>
137139
<ItemGroup>
@@ -172,7 +174,6 @@
172174
</ItemGroup>
173175
<ItemGroup>
174176
<Folder Include="App_Data\" />
175-
<Folder Include="Models\" />
176177
</ItemGroup>
177178
<ItemGroup>
178179
<Content Include="fonts\glyphicons-halflings-regular.woff" />

Agenda/Models/Contacto.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Web;
5+
6+
namespace Agenda.Models
7+
{
8+
public class Contacto
9+
{
10+
public int Id { get; set; }
11+
public string Nombre { get; set; }
12+
public ICollection<Telefono> Telefonos { get; set; }
13+
}
14+
15+
}

Agenda/Models/Telefono.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Web;
5+
6+
namespace Agenda.Models
7+
{
8+
public class Telefono
9+
{
10+
public int Id { get; set; }
11+
public string Numero { get; set; }
12+
public string Nombre { get; set; }
13+
14+
public Contacto Contacto { get; set; }
15+
}
16+
}

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Pasos
22

33
1. Creación de la aplicación web
4-
2. Instalar NuGet EntityFramework
4+
2. Instalar NuGet EntityFramework
5+
3. Agregar clases del modelo
6+

0 commit comments

Comments
 (0)