Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
66a64c9
Merge pull request #3 from loresoft/master
djechelon Jul 9, 2015
23b5bf1
Merge pull request #4 from loresoft/master
djechelon Jul 9, 2015
5e8bb2a
Mysql detector
Jul 10, 2015
92ab257
Update xunit
Jul 10, 2015
b8b42a5
Draft of MySql tests
Jul 10, 2015
4da2cad
Escape in runner, not in mapping provider
Jul 13, 2015
40fcf7d
Merge from upstream
Jul 13, 2015
dc3ef71
Escape in runner, not in mapping provider
Jul 13, 2015
1c85f62
Merge from master
Jul 13, 2015
b26a91a
Merge pull request #5 from loresoft/master
djechelon Jul 15, 2015
f4c3327
Xunit
Jul 15, 2015
2395570
Merge branch 'master' of https://github.com/OpenCST/EntityFramework.E…
Jul 15, 2015
3f12a41
Escape in runner, not in mapping provider
Jul 13, 2015
6a3aa25
Advice from [email protected]
Jul 16, 2015
5cf8f6b
Merge
Jul 16, 2015
98916ea
Update tests with new specifications of Mapping
Jul 16, 2015
579b386
appveyor mysql
Jul 16, 2015
ca5dd80
Merge pull request #6 from loresoft/master
djechelon Jul 16, 2015
0441fe1
Net40 test updated
Jul 17, 2015
6c29dcc
Merge branch 'mysqlrunner' of https://github.com/OpenCST/EntityFramew…
Jul 17, 2015
47c67d1
Net40 test updated
Jul 17, 2015
22385b1
Implement batch runner for postgresql.
raol Dec 9, 2015
8601958
Remove detecting outside transaction.
raol Mar 4, 2016
f43974e
Put schema and table name in quotes
raol Mar 4, 2016
3bc120f
Merge pull request #7 from raol/pgsqlrunner
djechelon May 24, 2016
dd0b823
Merge mysqlbatchrunner branch
May 24, 2016
fae16bf
Solution configuration update
Dec 20, 2016
4a8ce60
Merge pull request #1 from OpenCST/master
Feb 22, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
215 changes: 215 additions & 0 deletions Database/MySql/Tracker.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,215 @@
CREATE DATABASE IF NOT EXISTS `Tracker`;
USE `Tracker`
;


/****** Object: Table `Role` ******/

CREATE TABLE IF NOT EXISTS `Role`(
`Id` int AUTO_INCREMENT NOT NULL,
`Name` varchar(50) NOT NULL,
`Description` varchar(150) NULL,
`CreatedDate` datetime NOT NULL DEFAULT NOW(),
`ModifiedDate` datetime NOT NULL DEFAULT NOW(),
`RowVersion` timestamp NOT NULL,
CONSTRAINT `PK_Role` PRIMARY KEY
(
`Id` ASC
)
)
;

/****** Object: Table `User` ******/

CREATE TABLE IF NOT EXISTS `User`(
`Id` int AUTO_INCREMENT NOT NULL,
`EmailAddress` varchar(250) NOT NULL,
`FirstName` varchar(200) NULL,
`LastName` varchar(200) NULL,
`Avatar` BLOB NULL,
`CreatedDate` datetime NOT NULL DEFAULT NOW(),
`ModifiedDate` datetime NOT NULL DEFAULT NOW(),
`RowVersion` timestamp NOT NULL,
`PasswordHash` varchar(86) NOT NULL DEFAULT '',
`PasswordSalt` varchar(5) NOT NULL DEFAULT '',
`Comment` text NULL,
`IsApproved` tinyint NOT NULL DEFAULT 1,
`LastLoginDate` datetime NULL DEFAULT NOW(),
`LastActivityDate` datetime NOT NULL DEFAULT NOW(),
`LastPasswordChangeDate` datetime NULL,
`AvatarType` varchar(150) NULL,
CONSTRAINT `PK_User` PRIMARY KEY
(
`Id` ASC
),UNIQUE INDEX `IX_User`
(
`EmailAddress` ASC
)
)
;

/****** Object: Table `UserRole` ******/


CREATE TABLE IF NOT EXISTS `UserRole`(
`UserId` int NOT NULL REFERENCES `User`(`Id`),
`RoleId` int NOT NULL REFERENCES `Role`(`Id`),
CONSTRAINT `PK_UserRole` PRIMARY KEY
(
`UserId` ASC,
`RoleId` ASC
)
)
;



/****** Object: Table `Priority` ******/

CREATE TABLE IF NOT EXISTS `Priority`(
`Id` int NOT NULL,
`Name` varchar(50) NOT NULL,
`Order` int NOT NULL,
`Description` varchar(200) NULL,
`CreatedDate` datetime NOT NULL DEFAULT NOW(),
`ModifiedDate` datetime NOT NULL DEFAULT NOW(),
`RowVersion` timestamp NOT NULL,
CONSTRAINT `PK_Priority` PRIMARY KEY
(
`Id` ASC
)
)
;

/****** Object: Table `Status` ******/

CREATE TABLE IF NOT EXISTS `Status`(
`Id` int AUTO_INCREMENT NOT NULL,
`Name` varchar(50) NOT NULL,
`Description` varchar(150) NULL,
`Order` int NOT NULL,
`CreatedDate` datetime NOT NULL DEFAULT NOW(),
`ModifiedDate` datetime NOT NULL DEFAULT NOW(),
`RowVersion` timestamp NOT NULL,
CONSTRAINT `PK_Status` PRIMARY KEY
(
`Id` ASC
)
)
;


/****** Object: Table `Task` ******/

CREATE TABLE IF NOT EXISTS `Task`(
`Id` int AUTO_INCREMENT NOT NULL,
`StatusId` int NOT NULL REFERENCES `Status`(`Id`),
`PriorityId` int NULL REFERENCES `Priority`(`Id`),
`CreatedId` int NOT NULL REFERENCES `User`(`Id`),
`Summary` varchar(255) NOT NULL,
`Details` varchar(2000) NULL,
`StartDate` datetime NULL,
`DueDate` datetime NULL,
`CompleteDate` datetime NULL,
`AssignedId` int null REFERENCES `User`(`Id`),
`CreatedDate` datetime NOT NULL DEFAULT NOW(),
`ModifiedDate` datetime NOT NULL DEFAULT NOW(),
`RowVersion` timestamp NOT NULL,
`LastModifiedBy` varchar(50) NULL,
CONSTRAINT `PK_Task` PRIMARY KEY
(
`Id` ASC
),INDEX `IX_Task`
(
`AssignedId` ASC,
`StatusId` ASC
)
)
;


/****** Object: Table `TaskExtended` ******/


CREATE TABLE IF NOT EXISTS `TaskExtended`(
`TaskId` int NOT NULL REFERENCES `Task`(`Id`),
`Browser` varchar(200) NULL,
`OS` varchar(150) NULL,
`CreatedDate` datetime NOT NULL,
`ModifiedDate` datetime NOT NULL,
`RowVersion` timestamp NOT NULL,
CONSTRAINT `PK_TaskExtended` PRIMARY KEY
(
`TaskId` ASC
)
)
;


/****** Object: Table `Audit` ******/

CREATE TABLE IF NOT EXISTS `Audit`(
`Id` int AUTO_INCREMENT NOT NULL,
`Date` datetime NOT NULL,
`UserId` int NULL REFERENCES `User`(`Id`),
`TaskId` int NULL REFERENCES `Task`(`Id`),
`Content` TEXT NOT NULL,
`Username` varchar(50) NOT NULL,
`CreatedDate` datetime NOT NULL,
`RowVersion` timestamp NOT NULL,
CONSTRAINT `PK_Audit` PRIMARY KEY
(
`Id` ASC
)
);


INSERT into `Priority` (`Id`, `Name`, `Order`, `Description`, `CreatedDate`, `ModifiedDate`) VALUES (1, N'High', 1, N'A High Priority', CAST(N'2011-09-08 13:57:02.743' AS DateTime), CAST(N'2011-09-08 13:57:02.743' AS DateTime))
;
INSERT into `Priority` (`Id`, `Name`, `Order`, `Description`, `CreatedDate`, `ModifiedDate`) VALUES (2, N'Normal', 2, N'A Normal Priority', CAST(N'2011-09-08 13:57:02.743' AS DateTime), CAST(N'2011-09-08 13:57:02.743' AS DateTime))
;
INSERT into `Priority` (`Id`, `Name`, `Order`, `Description`, `CreatedDate`, `ModifiedDate`) VALUES (3, N'Low', 3, N'A Low Priority', CAST(N'2011-09-08 13:57:02.743' AS DateTime), CAST(N'2011-09-08 13:57:02.743' AS DateTime))
;

INSERT into `Role` (`Id`, `Name`, `Description`, `CreatedDate`, `ModifiedDate`) VALUES (1, N'Admin', NULL, CAST(N'2011-09-08 13:57:02.730' AS DateTime), CAST(N'2011-09-08 13:57:02.730' AS DateTime))
;
INSERT into `Role` (`Id`, `Name`, `Description`, `CreatedDate`, `ModifiedDate`) VALUES (2, N'Manager', NULL, CAST(N'2011-09-08 13:57:02.730' AS DateTime), CAST(N'2011-09-08 13:57:02.730' AS DateTime))
;
INSERT into `Role` (`Id`, `Name`, `Description`, `CreatedDate`, `ModifiedDate`) VALUES (3, N'Newb', NULL, CAST(N'2011-09-08 13:57:02.730' AS DateTime), CAST(N'2011-09-08 13:57:02.730' AS DateTime))
;
INSERT into `Role` (`Id`, `Name`, `Description`, `CreatedDate`, `ModifiedDate`) VALUES (4, N'Nobody', NULL, CAST(N'2011-09-08 13:57:02.730' AS DateTime), CAST(N'2011-09-08 13:57:02.730' AS DateTime))
;
INSERT into `Role` (`Id`, `Name`, `Description`, `CreatedDate`, `ModifiedDate`) VALUES (5, N'Power User', NULL, CAST(N'2011-09-08 13:57:02.730' AS DateTime), CAST(N'2011-09-08 13:57:02.730' AS DateTime))
;


INSERT INTO `Status` (`Id`, `Name`, `Description`, `Order`, `CreatedDate`, `ModifiedDate`) VALUES (1, N'Not Started', NULL, 1, CAST(N'2011-09-08 13:57:02.733' AS DateTime), CAST(N'2011-09-08 13:57:02.733' AS DateTime))
;
INSERT INTO `Status` (`Id`, `Name`, `Description`, `Order`, `CreatedDate`, `ModifiedDate`) VALUES (2, N'In Progress', NULL, 2, CAST(N'2011-09-08 13:57:02.733' AS DateTime), CAST(N'2011-09-08 13:57:02.733' AS DateTime))
;
INSERT INTO `Status` (`Id`, `Name`, `Description`, `Order`, `CreatedDate`, `ModifiedDate`) VALUES (3, N'Completed', NULL, 3, CAST(N'2011-09-08 13:57:02.733' AS DateTime), CAST(N'2011-09-08 13:57:02.733' AS DateTime))
;
INSERT INTO `Status` (`Id`, `Name`, `Description`, `Order`, `CreatedDate`, `ModifiedDate`) VALUES (4, N'Waiting on someone else', NULL, 4, CAST(N'2011-09-08 13:57:02.733' AS DateTime), CAST(N'2011-09-08 13:57:02.733' AS DateTime))
;
INSERT INTO `Status` (`Id`, `Name`, `Description`, `Order`, `CreatedDate`, `ModifiedDate`) VALUES (5, N'Deferred', NULL, 5, CAST(N'2011-09-08 13:57:02.733' AS DateTime), CAST(N'2011-09-08 13:57:02.733' AS DateTime))
;
INSERT INTO `Status` (`Id`, `Name`, `Description`, `Order`, `CreatedDate`, `ModifiedDate`) VALUES (6, N'Done', NULL, 6, CAST(N'2011-09-08 13:57:02.733' AS DateTime), CAST(N'2011-09-08 13:57:02.733' AS DateTime))
;

;
INSERT INTO `Task` (`Id`, `StatusId`, `PriorityId`, `CreatedId`, `Summary`, `Details`, `StartDate`, `DueDate`, `CompleteDate`, `AssignedId`, `CreatedDate`, `ModifiedDate`, `LastModifiedBy`) VALUES (1, 1, 1, 2, N'Make it to Earth', N'Find and make it to earth while avoiding the cylons.', NULL, NULL, NULL, 1, CAST(N'2009-12-18 11:01:58.713' AS DateTime), CAST(N'2009-12-18 11:01:58.713' AS DateTime), N'[email protected]')
;

;
INSERT INTO `User` (`Id`, `EmailAddress`, `FirstName`, `LastName`, `Avatar`, `CreatedDate`, `ModifiedDate`, `PasswordHash`, `PasswordSalt`, `Comment`, `IsApproved`, `LastLoginDate`, `LastActivityDate`, `LastPasswordChangeDate`, `AvatarType`) VALUES (1, N'[email protected]', N'William', N'Adama', NULL, CAST(N'2009-05-06 17:46:20.597' AS DateTime), CAST(N'2009-05-06 17:46:20.597' AS DateTime), N'1+v5rvSXnyX7tvwTKfM+aq+s0hDmNXsduGZfq8sQv1ggPnGlQdDdBdbUP0bUmbMbiU40PvRQWKRAy5QUd1xrAA', N'?#nkY', NULL, 1, NULL, CAST(N'2009-05-06 17:46:20.597' AS DateTime), NULL, NULL)
;
INSERT INTO `User` (`Id`, `EmailAddress`, `FirstName`, `LastName`, `Avatar`, `CreatedDate`, `ModifiedDate`, `PasswordHash`, `PasswordSalt`, `Comment`, `IsApproved`, `LastLoginDate`, `LastActivityDate`, `LastPasswordChangeDate`, `AvatarType`) VALUES (2, N'[email protected]', N'Laura', N'Roslin', NULL, CAST(N'2009-05-06 17:47:00.330' AS DateTime), CAST(N'2009-05-06 17:47:00.330' AS DateTime), N'Sx/jwRHFW/CQpO0E6G8d+jo344AmAKfX+C48a0iAZyMrb4sE8VoDuyZorbhbLZAX9f4UZk67O7eCjk854OrYSg', N'Ph)6;', NULL, 1, NULL, CAST(N'2009-05-06 17:47:00.330' AS DateTime), NULL, NULL)
;
INSERT INTO `User` (`Id`, `EmailAddress`, `FirstName`, `LastName`, `Avatar`, `CreatedDate`, `ModifiedDate`, `PasswordHash`, `PasswordSalt`, `Comment`, `IsApproved`, `LastLoginDate`, `LastActivityDate`, `LastPasswordChangeDate`, `AvatarType`) VALUES (3, N'[email protected]', N'Kara', N'Thrace', NULL, CAST(N'2009-05-06 17:47:43.417' AS DateTime), CAST(N'2009-05-06 17:47:43.417' AS DateTime), N'5KhtS4ax7G1aGkq97w02ooVZMmJp8bcySEKMSxruXu/Z/wRKoNAxMlkjRVY1yLavrC3GRYQZjy5b6JW8cR5EWg', N'!`@2/', NULL, 1, NULL, CAST(N'2009-05-06 17:47:43.417' AS DateTime), NULL, NULL)
;
INSERT INTO `User` (`Id`, `EmailAddress`, `FirstName`, `LastName`, `Avatar`, `CreatedDate`, `ModifiedDate`, `PasswordHash`, `PasswordSalt`, `Comment`, `IsApproved`, `LastLoginDate`, `LastActivityDate`, `LastPasswordChangeDate`, `AvatarType`) VALUES (4, N'[email protected]', N'Lee', N'Adama', NULL, CAST(N'2009-05-06 17:48:02.367' AS DateTime), CAST(N'2009-05-06 17:48:02.367' AS DateTime), N'IrK8OhI2n4Ev3YA4y5kP7vy+n2CffX2MgcONbAh6/kZpNZYBYoYyrMhqdYztehL0NAIdvcInQ6zOjMplq+zWQA', N'e@_a{', NULL, 1, NULL, CAST(N'2009-05-06 17:48:02.367' AS DateTime), NULL, NULL)
;
INSERT INTO `User` (`Id`, `EmailAddress`, `FirstName`, `LastName`, `Avatar`, `CreatedDate`, `ModifiedDate`, `PasswordHash`, `PasswordSalt`, `Comment`, `IsApproved`, `LastLoginDate`, `LastActivityDate`, `LastPasswordChangeDate`, `AvatarType`) VALUES (5, N'[email protected]', N'Gaius', N'Baltar', NULL, CAST(N'2009-05-06 17:48:26.273' AS DateTime), CAST(N'2009-05-06 17:48:26.273' AS DateTime), N'7tfajMaEerDNVgi6Oi6UJ6JxsUXZ0u4zQeUrZQxnaXJQ2f2vd9AzBR4sVOaH7LZtCjQopMzlQ38QqNEnpK0B/g', N'_qpA2', NULL, 1, NULL, CAST(N'2009-05-06 17:48:26.273' AS DateTime), NULL, NULL)
;
INSERT INTO `User` (`Id`, `EmailAddress`, `FirstName`, `LastName`, `Avatar`, `CreatedDate`, `ModifiedDate`, `PasswordHash`, `PasswordSalt`, `Comment`, `IsApproved`, `LastLoginDate`, `LastActivityDate`, `LastPasswordChangeDate`, `AvatarType`) VALUES (6, N'[email protected]', N'Saul', N'Tigh', NULL, CAST(N'2009-05-06 17:49:26.023' AS DateTime), CAST(N'2009-05-06 17:49:26.023' AS DateTime), N'wzkR89zRXe7hND1jqAP9xgupYJBvEZcjsfUe3TaU45kxRajjjS9u0fOTLK+uglzk67E;chJdeoikWs7hxMNRA', N'h`-zG', NULL, 1, NULL, CAST(N'2009-05-06 17:49:26.023' AS DateTime), NULL, NULL)
;
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\xunit.runner.visualstudio.2.0.0\build\net20\xunit.runner.visualstudio.props" Condition="Exists('..\packages\xunit.runner.visualstudio.2.0.0\build\net20\xunit.runner.visualstudio.props')" />
<Import Project="..\packages\xunit.core.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.props" Condition="Exists('..\packages\xunit.core.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Expand All @@ -15,6 +17,7 @@
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>27f4ad9c</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down Expand Up @@ -72,8 +75,17 @@
<Reference Include="System.Security" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
<Reference Include="xunit">
<HintPath>..\packages\xunit.1.9.2\lib\net20\xunit.dll</HintPath>
<Reference Include="xunit.abstractions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<HintPath>..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="xunit.assert, Version=2.0.0.2929, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<HintPath>..\packages\xunit.assert.2.0.0\lib\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.assert.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="xunit.core, Version=2.0.0.2929, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<HintPath>..\packages\xunit.extensibility.core.2.0.0\lib\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down Expand Up @@ -113,6 +125,13 @@
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\xunit.core.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.core.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.props'))" />
<Error Condition="!Exists('..\packages\xunit.runner.visualstudio.2.0.0\build\net20\xunit.runner.visualstudio.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.runner.visualstudio.2.0.0\build\net20\xunit.runner.visualstudio.props'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
6 changes: 5 additions & 1 deletion Source/EntityFramework.Extended.Test/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@
<packages>
<package id="EntityFramework" version="6.1.3" targetFramework="net45" />
<package id="FluentAssertions" version="3.4.1" targetFramework="net45" />
<package id="xunit" version="1.9.2" targetFramework="net45" />
<package id="xunit" version="2.0.0" targetFramework="net45" />
<package id="xunit.abstractions" version="2.0.0" targetFramework="net45" />
<package id="xunit.assert" version="2.0.0" targetFramework="net45" />
<package id="xunit.extensibility.core" version="2.0.0" targetFramework="net45" />
<package id="xunit.runner.visualstudio" version="2.0.0" targetFramework="net45" />
</packages>
17 changes: 17 additions & 0 deletions Source/EntityFramework.Extended.net45.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EntityFramework.Extended.Te
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{BE12C461-E0A7-43E3-B304-8D80D7E3D046}"
ProjectSection(SolutionItems) = preProject
..\appveyor.yml = ..\appveyor.yml
..\Master.proj = ..\Master.proj
..\readme.md = ..\readme.md
EndProjectSection
Expand All @@ -21,6 +22,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tracker.SqlServer.Test", "S
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tracker.SqlServer.Entities", "Samples\net45\Tracker.SqlServer.Entities\Tracker.SqlServer.Entities.csproj", "{60743577-CDBD-4E89-AC63-F46CF914458D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MySql", "MySql", "{80A2F9BD-EB60-4BCF-A051-E3339EDE85FA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tracker.MySql.CodeFirst", "Samples\net45\Tracker.MySql.CodeFirst\Tracker.MySql.CodeFirst.csproj", "{5F273EEF-E673-48F3-A116-075DA6DAF780}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tracker.MySql.Test", "Samples\net45\Tracker.MySql.Test\Tracker.MySql.Test.csproj", "{E58134C4-E5C6-4929-A60F-A340464AF36E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -47,6 +54,14 @@ Global
{60743577-CDBD-4E89-AC63-F46CF914458D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{60743577-CDBD-4E89-AC63-F46CF914458D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{60743577-CDBD-4E89-AC63-F46CF914458D}.Release|Any CPU.Build.0 = Release|Any CPU
{5F273EEF-E673-48F3-A116-075DA6DAF780}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5F273EEF-E673-48F3-A116-075DA6DAF780}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5F273EEF-E673-48F3-A116-075DA6DAF780}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5F273EEF-E673-48F3-A116-075DA6DAF780}.Release|Any CPU.Build.0 = Release|Any CPU
{E58134C4-E5C6-4929-A60F-A340464AF36E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E58134C4-E5C6-4929-A60F-A340464AF36E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E58134C4-E5C6-4929-A60F-A340464AF36E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E58134C4-E5C6-4929-A60F-A340464AF36E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -55,6 +70,8 @@ Global
{FA68FB7C-D87E-497B-A300-F2A7827FE92C} = {14134A51-5696-4B7C-B257-40E06494C315}
{ACB6E31F-C2B8-48BF-97C5-22FED0F6D6AC} = {14134A51-5696-4B7C-B257-40E06494C315}
{60743577-CDBD-4E89-AC63-F46CF914458D} = {14134A51-5696-4B7C-B257-40E06494C315}
{5F273EEF-E673-48F3-A116-075DA6DAF780} = {80A2F9BD-EB60-4BCF-A051-E3339EDE85FA}
{E58134C4-E5C6-4929-A60F-A340464AF36E} = {80A2F9BD-EB60-4BCF-A051-E3339EDE85FA}
EndGlobalSection
GlobalSection(TestCaseManagementSettings) = postSolution
CategoryFile = EntityFramework.Extended.vsmdi
Expand Down
11 changes: 8 additions & 3 deletions Source/EntityFramework.Extended/Batch/MySqlBatchRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ private int InternalDelete<TEntity>(ObjectContext objectContext, EntityMap entit
sqlBuilder.Append("DELETE j0");
sqlBuilder.AppendLine();

sqlBuilder.AppendFormat("FROM {0} AS j0 INNER JOIN (", entityMap.TableName);
sqlBuilder.AppendFormat("FROM {0} AS j0 INNER JOIN (", QuoteIdentifier(entityMap.TableName));
sqlBuilder.AppendLine();
sqlBuilder.AppendLine(innerSelect);
sqlBuilder.Append(") AS j1 ON (");
Expand All @@ -119,7 +119,7 @@ private int InternalDelete<TEntity>(ObjectContext objectContext, EntityMap entit
}
sqlBuilder.Append(")");

deleteCommand.CommandText = sqlBuilder.ToString().Replace("[", "").Replace("]", "");
deleteCommand.CommandText = sqlBuilder.ToString().Replace("[", "`").Replace("]", "`");

#if NET45
int result = async
Expand Down Expand Up @@ -230,7 +230,7 @@ private int InternalUpdate<TEntity>(ObjectContext objectContext, EntityMap entit

sqlBuilder.Append("UPDATE ");
sqlBuilder.Append(entityMap.TableName);
sqlBuilder.AppendFormat(" AS j0 INNER JOIN (", entityMap.TableName);
sqlBuilder.AppendFormat(" AS j0 INNER JOIN (", QuoteIdentifier(entityMap.TableName));
sqlBuilder.AppendLine();
sqlBuilder.AppendLine(innerSelect);
sqlBuilder.Append(") AS j1 ON (");
Expand Down Expand Up @@ -449,5 +449,10 @@ private static string GetSelectSql<TEntity>(ObjectQuery<TEntity> query, EntityMa

return innerJoinSql;
}

private static string QuoteIdentifier(string name)
{
return ("`" + name + "`");
}
}
}
Loading