Skip to content

Commit b5a82cb

Browse files
author
Roman
committed
First
0 parents  commit b5a82cb

File tree

393 files changed

+729986
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

393 files changed

+729986
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
using BookStore.Domain.Entities;
7+
8+
namespace BookStore.Domain.Abstract
9+
{
10+
public interface IBookRepository
11+
{
12+
IQueryable<Book> Books { get; }
13+
}
14+
}

BookStore.Domain/App.config

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<configSections>
4+
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
5+
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
6+
</configSections>
7+
<entityFramework>
8+
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
9+
<parameters>
10+
<parameter value="mssqllocaldb" />
11+
</parameters>
12+
</defaultConnectionFactory>
13+
<providers>
14+
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
15+
</providers>
16+
</entityFramework>
17+
</configuration>
+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{B52FE83E-5FD1-4ED7-AD08-A003EB187650}</ProjectGuid>
8+
<OutputType>Library</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>BookStore.Domain</RootNamespace>
11+
<AssemblyName>BookStore.Domain</AssemblyName>
12+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
</PropertyGroup>
15+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
16+
<DebugSymbols>true</DebugSymbols>
17+
<DebugType>full</DebugType>
18+
<Optimize>false</Optimize>
19+
<OutputPath>bin\Debug\</OutputPath>
20+
<DefineConstants>DEBUG;TRACE</DefineConstants>
21+
<ErrorReport>prompt</ErrorReport>
22+
<WarningLevel>4</WarningLevel>
23+
</PropertyGroup>
24+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
25+
<DebugType>pdbonly</DebugType>
26+
<Optimize>true</Optimize>
27+
<OutputPath>bin\Release\</OutputPath>
28+
<DefineConstants>TRACE</DefineConstants>
29+
<ErrorReport>prompt</ErrorReport>
30+
<WarningLevel>4</WarningLevel>
31+
</PropertyGroup>
32+
<ItemGroup>
33+
<Reference Include="DevRain.Data.Extracting">
34+
<HintPath>..\packages\DataExtractingSDK.1.0.1\lib\net40\DevRain.Data.Extracting.dll</HintPath>
35+
</Reference>
36+
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
37+
<SpecificVersion>False</SpecificVersion>
38+
<HintPath>..\..\WoodStore\packages\EntityFramework.6.1.2\lib\net45\EntityFramework.dll</HintPath>
39+
</Reference>
40+
<Reference Include="HtmlAgilityPack">
41+
<HintPath>..\packages\HtmlAgilityPack.1.4.9\lib\Net45\HtmlAgilityPack.dll</HintPath>
42+
</Reference>
43+
<Reference Include="Microsoft.JScript" />
44+
<Reference Include="Microsoft.mshtml, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
45+
<EmbedInteropTypes>True</EmbedInteropTypes>
46+
<Private>True</Private>
47+
<HintPath>..\packages\DataExtractingSDK.1.0.1\lib\net40\Microsoft.mshtml.dll</HintPath>
48+
</Reference>
49+
<Reference Include="Moq">
50+
<HintPath>..\packages\Moq.4.2.1502.0911\lib\net40\Moq.dll</HintPath>
51+
</Reference>
52+
<Reference Include="System" />
53+
<Reference Include="System.ComponentModel.DataAnnotations" />
54+
<Reference Include="System.Core" />
55+
<Reference Include="System.Drawing" />
56+
<Reference Include="System.Web.Mvc, Version=4.0.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
57+
<Reference Include="System.Windows.Forms" />
58+
<Reference Include="System.Xml.Linq" />
59+
<Reference Include="System.Data.DataSetExtensions" />
60+
<Reference Include="Microsoft.CSharp" />
61+
<Reference Include="System.Data" />
62+
<Reference Include="System.Xml" />
63+
</ItemGroup>
64+
<ItemGroup>
65+
<Compile Include="Abstract\IBookRepository.cs" />
66+
<Compile Include="Class1.cs" />
67+
<Compile Include="Concrete\EFBookRepository.cs" />
68+
<Compile Include="Concrete\EFDbContext.cs" />
69+
<Compile Include="Entities\Book.cs" />
70+
<Compile Include="Properties\AssemblyInfo.cs" />
71+
</ItemGroup>
72+
<ItemGroup>
73+
<None Include="App.config" />
74+
<None Include="packages.config" />
75+
</ItemGroup>
76+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
77+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
78+
Other similar extension points exist, see Microsoft.Common.targets.
79+
<Target Name="BeforeBuild">
80+
</Target>
81+
<Target Name="AfterBuild">
82+
</Target>
83+
-->
84+
</Project>

BookStore.Domain/Class1.cs

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace BookStore.Domain
8+
{
9+
public class Class1
10+
{
11+
}
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
using BookStore.Domain.Entities;
7+
using BookStore.Domain.Abstract;
8+
9+
namespace BookStore.Domain.Concrete
10+
{
11+
public class EFBookRepository:IBookRepository
12+
{
13+
private EFDbContext context = new EFDbContext();
14+
public IQueryable<Book> Books
15+
{
16+
get { return context.Books; }
17+
}
18+
}
19+
}
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
using BookStore.Domain.Entities;
7+
using System.Data.Entity;
8+
9+
namespace BookStore.Domain
10+
{
11+
public class EFDbContext: DbContext
12+
{
13+
public EFDbContext() : base() { }
14+
public DbSet<Book> Books { get; set; }
15+
public DbSet<Genre> Genres { get; set; }
16+
17+
}
18+
}

BookStore.Domain/Entities/Book.cs

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace BookStore.Domain.Entities
8+
{
9+
public class Genre{
10+
public int GenreID { get; set; }
11+
public string Genre1{get;set;}
12+
13+
}
14+
public class Book
15+
{
16+
public int BookID { get; set; }
17+
public string Title { get; set; }
18+
public string Author { get; set; }
19+
public double Rate { get; set; }
20+
public string Genre { get; set; }
21+
public decimal Price { get; set; }
22+
public string Annotation { get; set; }
23+
public string Image_url { get; set; }
24+
public ICollection<Genre> genres { get; set; }
25+
26+
27+
28+
}
29+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("BookStore.Domain")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("BookStore.Domain")]
13+
[assembly: AssemblyCopyright("Copyright © 2015")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
19+
// COM, set the ComVisible attribute to true on that type.
20+
[assembly: ComVisible(false)]
21+
22+
// The following GUID is for the ID of the typelib if this project is exposed to COM
23+
[assembly: Guid("c50954fe-10a9-4c5a-abdc-4ead47379d99")]
24+
25+
// Version information for an assembly consists of the following four values:
26+
//
27+
// Major Version
28+
// Minor Version
29+
// Build Number
30+
// Revision
31+
//
32+
// You can specify all the values or you can default the Build and Revision Numbers
33+
// by using the '*' as shown below:
34+
// [assembly: AssemblyVersion("1.0.*")]
35+
[assembly: AssemblyVersion("1.0.0.0")]
36+
[assembly: AssemblyFileVersion("1.0.0.0")]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<configSections>
4+
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
5+
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
6+
</configSections>
7+
<entityFramework>
8+
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
9+
<parameters>
10+
<parameter value="mssqllocaldb" />
11+
</parameters>
12+
</defaultConnectionFactory>
13+
<providers>
14+
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
15+
</providers>
16+
</entityFramework>
17+
</configuration>

0 commit comments

Comments
 (0)