Skip to content

Commit

Permalink
Merge pull request #114 from M-Zuber/Development
Browse files Browse the repository at this point in the history
Connect to db using windows auth
  • Loading branch information
M-Zuber committed Dec 30, 2015
2 parents 6d32e40 + 5f07633 commit 511e198
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@
- Cleanup CategoryService code to be more idoimatic (also use some `C#`isms) [code](https://github.com/M-Zuber/MyHome/commit/cf5f5ea0627b640926425d08afbf6e5fc2001230)
- General code cleanup [code](https://github.com/M-Zuber/MyHome/commit/c01be5c423f40dea61e00f6c0b651a461bec63ac) [code](https://github.com/M-Zuber/MyHome/commit/fed97602c2fc28e0122c77b5b30a86f7770c812a) [code](https://github.com/M-Zuber/MyHome/commit/167da4c53ebf62abd43b58f96bfa47dce76f18c8)
- Fix [#109](https://github.com/M-Zuber/MyHome/issues/109) [code](https://github.com/M-Zuber/MyHome/commit/70b1799cad5df57961df978f9a1c5665ab961b32)

#29/12/2015

- Fix [#110](https://github.com/M-Zuber/MyHome/issues/110) [code](https://github.com/M-Zuber/MyHome/commit/87d674687c11bf88abaafc885d5abc02391d1b6c)
4 changes: 1 addition & 3 deletions Docs/GettingStarted.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# Database Setup
1. Install SQL Server
- You will need to install [SQL Server](http://downloadsqlserverexpress.com). The best option - but the biggest download file - is the `SQL Server Express with Advanced Services` option. This will give you what is needed in order to run the server and a full suite of managment tools.
2. Run the [scripts located here](https://github.com/M-Zuber/MyHome/tree/Testing/MyHome.Persistence/Scripts)
- This will create the tables and an user to connect with SQL Server not using Windows authentication
3. Verify that SQL Server has mixed/SQL authentication enabled, otherwise the program will not be able to connect
2. We are using EF Code first. There is no second step.

##Trouble Shooting
If the program still doesn't work, try the following:
Expand Down
4 changes: 1 addition & 3 deletions MyHome.Persistence/AccountingDataContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ namespace MyHome.Persistence
{
public class AccountingDataContext : DbContext
{
public const string ConnectionString = @"Server=.;Database=MyHome;User Id=home_user;Password=homeuser;";

public AccountingDataContext() : base(ConnectionString)
public AccountingDataContext() : base("name=Database")
{
}

Expand Down
3 changes: 3 additions & 0 deletions MyHome.Persistence/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
<connectionStrings>
<add name="Database" providerName="System.Data.SqlClient" connectionString="Data Source=.;Initial Catalog=MyHome;Integrated Security=true" />
</connectionStrings>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" /></startup></configuration>
3 changes: 3 additions & 0 deletions MyHome.UI/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
</providers>
</entityFramework>
<connectionStrings>
<add name="Database" providerName="System.Data.SqlClient" connectionString="Data Source=.;Initial Catalog=MyHome;Integrated Security=true" />
</connectionStrings>
</configuration>

0 comments on commit 511e198

Please sign in to comment.