aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-02-19 18:10:35 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-02-19 18:10:35 +0200
commit945520000da0ae4a3fa3b40e9756d67379e25314 (patch)
tree5d0b88721a2eb6a6805cf10fb08cce3f486e2928 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI
parent93e6a6bfa7238826dcdea989e279ec3450067f83 (diff)
downloadTango-945520000da0ae4a3fa3b40e9756d67379e25314.tar.gz
Tango-945520000da0ae4a3fa3b40e9756d67379e25314.zip
Machine Studio v4.0.8.0
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs11
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/UpdateViewVM.cs4
3 files changed, 7 insertions, 10 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs
index e07952f29..d6fb50a8c 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs
@@ -16,6 +16,7 @@ using Tango.MachineStudio.Common;
using Tango.MachineStudio.Common.StudioApplication;
using Tango.Core.Helpers;
using Tango.MachineStudio.Common.Web;
+using Tango.BL.Builders;
namespace Tango.MachineStudio.UI.Authentication
{
@@ -87,15 +88,7 @@ namespace Tango.MachineStudio.UI.Authentication
using (ObservablesContext db = ObservablesContext.CreateDefault())
{
- db.Roles.Load();
- db.Permissions.Load();
- db.RolesPermissions.Load();
-
- User user = db.Users
- .Include(x => x.UsersRoles)
- .Include(x => x.Contact)
- .Include(x => x.Address)
- .Include(x => x.Organization).SingleOrDefault(x => x.Email.ToLower() == email.ToLower());
+ User user = new UserBuilder(db).Set(x => x.Email.ToLower() == email.ToLower()).WithRolesAndPermissions().WithOrganization().Build();
if (user == null)
{
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs
index bceaaf956..f6386cfc9 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs
@@ -4,5 +4,5 @@ using System.Runtime.InteropServices;
[assembly: System.Windows.ThemeInfo(System.Windows.ResourceDictionaryLocation.None, System.Windows.ResourceDictionaryLocation.SourceAssembly)]
[assembly: AssemblyTitle("Tango - Machine Studio")]
-[assembly: AssemblyVersion("4.0.7.0")]
+[assembly: AssemblyVersion("4.0.8.0")]
[assembly: ComVisible(false)] \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/UpdateViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/UpdateViewVM.cs
index 17edf1dfd..c40f91005 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/UpdateViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/UpdateViewVM.cs
@@ -25,6 +25,7 @@ using Tango.MachineStudio.UI.Messages;
using Tango.Settings;
using Tango.MachineStudio.Common;
using Tango.Transport.Web;
+using Tango.BL;
namespace Tango.MachineStudio.UI.ViewModels
{
@@ -384,6 +385,9 @@ namespace Tango.MachineStudio.UI.ViewModels
{
try
{
+ LogManager.Log("Clearing EF model store...");
+ ObservablesContext.ClearModelStore();
+
Process p = new Process();
if (Status == UpdateStatus.UpdateCompleted)