mysql stuff

e
This commit is contained in:
Malloc of Kuzkycyziklistan 2017-06-05 07:20:39 -05:00
parent c8b83456c1
commit 7a7da0095b
15 changed files with 295 additions and 147 deletions

3
.gitignore vendored
View file

@ -1,6 +1,9 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# additions by alec (tm)
connectionStrings.config
# User-specific files
*.suo
*.user

View file

@ -14,32 +14,18 @@
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
<provider invariantName="System.Data.SQLite" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"></provider></providers>
</entityFramework>
<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SQLite" />
<remove invariant="System.Data.SQLite.EF6" />
<add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
<add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
</DbProviderFactories>
</system.data>
<connectionStrings>
<add name="Database" connectionString="data source=scape.db" providerName="System.Data.SQLite.EF6" />
</connectionStrings>
<connectionStrings configSource="connectionStrings.config" />
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Data.SQLite" publicKeyToken="db937bc2d44ff139" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.0.105.0" newVersion="1.0.105.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Data.SQLite.EF6" publicKeyToken="db937bc2d44ff139" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.0.105.0" newVersion="1.0.105.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<system.data>
<DbProviderFactories>
<remove invariant="MySql.Data.MySqlClient" />
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
</system.data>
</configuration>

View file

@ -49,27 +49,17 @@
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>packages\EntityFramework.6.1.3\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>packages\log4net.2.0.5\lib\net45-full\log4net.dll</HintPath>
<Reference Include="MySql.Data, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
<HintPath>packages\MySql.Data.6.9.9\lib\net45\MySql.Data.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MySql.Data.Entity.EF6, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
<HintPath>packages\MySql.Data.Entity.6.9.9\lib\net45\MySql.Data.Entity.EF6.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" />
<Reference Include="System.Data.SQLite, Version=1.0.105.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>packages\System.Data.SQLite.Core.1.0.105.0\lib\net46\System.Data.SQLite.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Data.SQLite.EF6, Version=1.0.105.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>packages\System.Data.SQLite.EF6.1.0.105.0\lib\net46\System.Data.SQLite.EF6.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Data.SQLite.EF6.Migrations, Version=1.0.104.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\System.Data.SQLite.EF6.Migrations.1.0.104\lib\System.Data.SQLite.EF6.Migrations.dll</HintPath>
</Reference>
<Reference Include="System.Data.SQLite.Linq, Version=1.0.105.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>packages\System.Data.SQLite.Linq.1.0.105.0\lib\net46\System.Data.SQLite.Linq.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Numerics" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Security" />
@ -81,13 +71,15 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="DAL\Item.cs" />
<Compile Include="DAL\ItemDefinition.cs" />
<Compile Include="DAL\ScapeDb.cs" />
<Compile Include="DAL\Session.cs" />
<Compile Include="DAL\User.cs" />
<Compile Include="Encryption\KeyExchange.cs" />
<Compile Include="Encryption\Cipher.cs" />
<Compile Include="Migrations\201706040437361_Initial.cs" />
<Compile Include="Migrations\201706040437361_Initial.Designer.cs">
<DependentUpon>201706040437361_Initial.cs</DependentUpon>
</Compile>
<Compile Include="Migrations\Configuration.cs" />
<Compile Include="Socks\Packet.cs" />
<Compile Include="Socks\ActiveConnection.cs" />
<Compile Include="Entrypoint.cs" />
@ -99,6 +91,10 @@
<None Include="App.config">
<SubType>Designer</SubType>
</None>
<None Include="connectionStrings.config">
<SubType>Designer</SubType>
<DependentUpon>App.config</DependentUpon>
</None>
<None Include="packages.config">
<SubType>Designer</SubType>
<DependentUpon>App.config</DependentUpon>
@ -129,13 +125,16 @@
<Name>Square</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Migrations\201706040437361_Initial.resx">
<DependentUpon>201706040437361_Initial.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="packages\System.Data.SQLite.Core.1.0.105.0\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('packages\System.Data.SQLite.Core.1.0.105.0\build\net46\System.Data.SQLite.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use 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\System.Data.SQLite.Core.1.0.105.0\build\net46\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\System.Data.SQLite.Core.1.0.105.0\build\net46\System.Data.SQLite.Core.targets'))" />
<Error Condition="!Exists('packages\Fody.2.0.4\build\dotnet\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Fody.2.0.4\build\dotnet\Fody.targets'))" />
<Error Condition="!Exists('packages\Costura.Fody.1.4.0\build\Costura.Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Costura.Fody.1.4.0\build\Costura.Fody.targets'))" />
</Target>

View file

@ -1,22 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.Spatial;
namespace CircleScape.DAL {
public partial class ItemDefinition {
public long Id { get; set; }
[Required]
public string Name { get; set; }
[Required]
public string Sheet { get; set; }
public long Offset { get; set; }
public bool Stackable { get; set; } = false;
public virtual ICollection<Item> Items { get; set; }
}
}

View file

@ -6,17 +6,13 @@ using System.Text;
using System.Threading.Tasks;
namespace CircleScape.DAL {
public class Item {
public partial class Origin {
public long Id { get; set; }
[Index("ItemItemDefinitionId")]
public long DefinitionId { get; set; }
public virtual ItemDefinition Definition { get; set; }
[Index("ItemUserId")]
[ForeignKey("User")]
public long UserId { get; set; }
public virtual User User { get; set; }
public long Quantity { get; set; }
public string Ip { get; set; }
}
}

View file

@ -1,55 +1,27 @@
namespace CircleScape.DAL {
using System;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Data.Entity.Migrations;
using System.Data.SQLite.EF6.Migrations;
namespace CircleScape.DAL {
[DbConfigurationType(typeof(MySql.Data.Entity.MySqlEFConfiguration))]
public partial class ScapeDb : DbContext {
static ScapeDb() {
Database.SetInitializer(
new MigrateDatabaseToLatestVersion<ScapeDb, ScapeDbMigrationConfig>(true)
);
DbConfiguration.SetConfiguration(new MySql.Data.Entity.MySqlEFConfiguration());
}
public ScapeDb() : base("name=Database") {
public ScapeDb()
: base("name=ScapeDbDebug")
{
}
public virtual DbSet<Session> Sessions { get; set; }
public virtual DbSet<User> Users { get; set; }
public virtual DbSet<Item> Items { get; set; }
public virtual DbSet<ItemDefinition> ItemDefinitions { get; set; }
public DbSet<User> Users { get; set; }
public DbSet<Origin> Origins { get; set; }
protected override void OnModelCreating(DbModelBuilder modelBuilder) {
modelBuilder.Entity<User>()
.HasMany(e => e.Sessions)
.WithRequired(e => e.User)
.HasForeignKey(e => e.UserId)
.WillCascadeOnDelete(true);
modelBuilder.Entity<User>()
.HasMany(e => e.Items)
.WithRequired(e => e.User)
.HasForeignKey(e => e.UserId)
.WillCascadeOnDelete(true);
modelBuilder.Entity<ItemDefinition>()
.HasMany(e => e.Items)
.WithRequired(e => e.Definition)
.HasForeignKey(e => e.DefinitionId)
.WillCascadeOnDelete(true);
}
}
internal sealed class ScapeDbMigrationConfig
: DbMigrationsConfiguration<ScapeDb>
{
public ScapeDbMigrationConfig() {
AutomaticMigrationsEnabled = true;
AutomaticMigrationDataLossAllowed = true;
SetSqlGenerator("System.Data.SQLite", new SQLiteMigrationSqlGenerator());
base.OnModelCreating(modelBuilder);
}
}
}

12
server/DAL/Server.cs Normal file
View file

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CircleScape.DAL {
class Server {
public int Id { get; set; }
}
}

View file

@ -1,18 +1,18 @@
using System;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.Spatial;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CircleScape.DAL {
public partial class Session {
public long Id { get; set; }
[Index("SessionUserId")]
public long UserId { get; set; }
[ForeignKey("User")]
public int UserId { get; set; }
public virtual User User { get; set; }
[Required]
public string IpAddress { get; set; }
}
}

View file

@ -1,8 +1,9 @@
using System;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.Spatial;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CircleScape.DAL {
public partial class User {
@ -14,16 +15,10 @@ namespace CircleScape.DAL {
[Required]
public string Password { get; set; }
public long? Joined { get; set; }
public long? LastLogin { get; set; }
[Required]
public string JoinedIp { get; set; }
public DateTime Joined { get; set; }
public DateTime? LastLogin { get; set; }
public string LastIp { get; set; }
public virtual ICollection<Session> Sessions { get; set; }
public virtual ICollection<Item> Items { get; set; }
public virtual ICollection<Origin> Origins { get; set; }
}
}

View file

@ -1,19 +1,15 @@
using System;
using System.Collections.Generic;
using System.Data.SQLite;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CircleScape.DAL;
//using CircleScape.DAL;
using System.Numerics;
using Square;
namespace CircleScape {
class Entrypoint {
static void Main(string[] args) {
var db = new ScapeDb();
var users = db.Users.ToList();
var server = new Kneesocks.Server<PendingConnection>(6770, PoolManager.Pending);
server.Start();

View file

@ -0,0 +1,29 @@
// <auto-generated />
namespace CircleScape.Migrations
{
using System.CodeDom.Compiler;
using System.Data.Entity.Migrations;
using System.Data.Entity.Migrations.Infrastructure;
using System.Resources;
[GeneratedCode("EntityFramework.Migrations", "6.1.3-40302")]
public sealed partial class Initial : IMigrationMetadata
{
private readonly ResourceManager Resources = new ResourceManager(typeof(Initial));
string IMigrationMetadata.Id
{
get { return "201706040437361_Initial"; }
}
string IMigrationMetadata.Source
{
get { return null; }
}
string IMigrationMetadata.Target
{
get { return Resources.GetString("Target"); }
}
}
}

View file

@ -0,0 +1,28 @@
namespace CircleScape.Migrations
{
using System;
using System.Data.Entity.Migrations;
public partial class Initial : DbMigration
{
public override void Up()
{
CreateTable(
"dbo.Users",
c => new
{
Id = c.Long(nullable: false, identity: true),
Username = c.String(nullable: false, unicode: false),
Password = c.String(nullable: false, unicode: false),
Joined = c.DateTime(nullable: false, precision: 0),
})
.PrimaryKey(t => t.Id);
}
public override void Down()
{
DropTable("dbo.Users");
}
}
}

View file

@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Target" xml:space="preserve">
<value>H4sIAAAAAAAEAM1X3W7bNhS+H7B3IHidik67Dlsgt8jsZMgWJ0aV9p6WjhViFKmRVGo/2y72SH2FHurfkp04WVEMARyZOuc73/mnv/zzb/h+k0nyAMYKrab0NJhQAirWiVDplBZu/eoX+v7djz+EF0m2IZ8auTdeDjWVndJ75/Izxmx8Dxm3QSZio61euyDWGeOJZq8nk1/Z6SkDhKCIRUj4oVBOZFB+wa8zrWLIXcHlQicgbX2Ob6ISldzwDGzOY5jSmTCxhCjmOQTz82tKzqXgSCMCuaaEK6Udd0jy7KOFyBmt0ijHAy7vtjmg3JpLCzX5s078WD8mr70frFNsoOLCOp09E/D0TR0YNlR/UXhpGzgM3QWG2G2912X4phQDYigZGjqbSeOFRpENvPwJwY8H/7/JPZaI/zshs0K6wsBUQeEMlydkWaykiP+E7Z3+C9RUFVL2CSElfLdzgEdLo3MwbvsB1jXNq4QStqvHhoqtWk+ncuJKuZ9/ouQGjfOVhDbfPYcjpw38DgoMd5AsuXNglMeAMmIj6wNbPiwKnxqLWGTYLJQs+OYaVOrupxQfKbkUG0iak5rFRyWwt1DJmQL2sHzc8pJb+1mb5Ptb/kMLBa3dOcbtTmRPwYSsK8FxYWLPO46opjZR1t18tadAMeB1jdqa/i7XCi8C10uQpaQzXg2HoKr/fQxbLt3gYdXkaSYUOzCiwgXPc0xCb2TVJySq59Wr6Pm9nFUYLLZ7Wrpl21rCguYpDN6iaWR6KYx1mDC+4j4/syQbiTWRPxDVxko/uMMu7mLdSPvnSmPfWBkCdGG7RE8ybMTSKWhJ1NNrpFauCC652TMQZloWmTo0VB7T7lq8j9GdHo/UtWwfqTs9HqlpwT5OczZGCdkgnsOMsVHKBiN3mP/H2mYo0lpv22fQJmFdskes+2ENVyKUYHgeROLrd7GN/paBfx+UjzMp0OFOYsGVWIN11Vqib4O3g0vD/2eBM2sTecQW/+5rdSVS4WP65O585mIZLlOJ9zUHG/efd+OLgXZXXYJuunLVLQ3Eorr9Tr7p4htP6afX28HtVnUH8l5pdKFiWO/DFy6+caeGrH99D+dgRdpB+Mu8gti3QAfayFyptW7ijR71GTUig3QswHFMAj83Tqx57PB1DNaW955PXBYocpGtILlSt4XLC3duLWQruXOLC9nj9svtvss5vM39N/stXECawtfRrfqtEDJpeV/uqZwDEL5G6q5DVnjvQ7h02yLdaHUkUB2+OeSgfM/eQZZLBLO3KuIP8BJuWF7XkPJ428zbwyBPJ2I37OFc8NTwzNYYnb7/Scr8b9J3XwEmjKgcxQ4AAA==</value>
</data>
<data name="DefaultSchema" xml:space="preserve">
<value>dbo</value>
</data>
</root>

View file

@ -0,0 +1,32 @@
namespace CircleScape.Migrations
{
using System;
using System.Data.Entity;
using System.Data.Entity.Migrations;
using System.Linq;
internal sealed class Configuration : DbMigrationsConfiguration<CircleScape.DAL.ScapeDb>
{
public Configuration()
{
SetSqlGenerator("MySql.Data.MySqlClient", new MySql.Data.Entity.MySqlMigrationSqlGenerator());
AutomaticMigrationsEnabled = false;
}
protected override void Seed(CircleScape.DAL.ScapeDb context)
{
// This method will be called after migrating to the latest version.
// You can use the DbSet<T>.AddOrUpdate() helper extension method
// to avoid creating duplicate seed data. E.g.
//
// context.People.AddOrUpdate(
// p => p.FullName,
// new Person { FullName = "Andrew Peters" },
// new Person { FullName = "Brice Lambson" },
// new Person { FullName = "Rowan Miller" }
// );
//
}
}
}

View file

@ -3,10 +3,6 @@
<package id="Costura.Fody" version="1.4.0" targetFramework="net46" developmentDependency="true" />
<package id="EntityFramework" version="6.1.3" targetFramework="net46" />
<package id="Fody" version="2.0.4" targetFramework="net46" developmentDependency="true" />
<package id="log4net" version="2.0.5" targetFramework="net46" />
<package id="System.Data.SQLite" version="1.0.105.0" targetFramework="net46" />
<package id="System.Data.SQLite.Core" version="1.0.105.0" targetFramework="net46" />
<package id="System.Data.SQLite.EF6" version="1.0.105.0" targetFramework="net46" />
<package id="System.Data.SQLite.EF6.Migrations" version="1.0.104" targetFramework="net46" />
<package id="System.Data.SQLite.Linq" version="1.0.105.0" targetFramework="net46" />
<package id="MySql.Data" version="6.9.9" targetFramework="net46" />
<package id="MySql.Data.Entity" version="6.9.9" targetFramework="net46" />
</packages>