public void Profile_persistence_test()
        {
            DateTime now = DateTime.Now;

            // Get datetime without milliseconds
            now = new DateTime(now.Ticks - (now.Ticks % TimeSpan.TicksPerSecond), now.Kind);
            var _applicationsystembo_settings_parentprofile = new zAppDev.DotNet.Framework.Identity.Model.ProfileSetting
            {
                Key   = "ProfileSetting_Key",
                Value = "ProfileSetting_Value",
            };
            var _applicationsystembo_settings_parentprofile2 = new zAppDev.DotNet.Framework.Identity.Model.ProfileSetting
            {
                Key   = "ProfileSetting_Key",
                Value = "ProfileSetting_Value",
            };

            new PersistenceSpecification <zAppDev.DotNet.Framework.Identity.Model.Profile>(Session)
            .CheckProperty(p => p.LanguageLCID, 5234)
            .CheckProperty(p => p.LocaleLCID, 5999)
            .CheckProperty(p => p.Theme, "Profile_Theme")
            .CheckBag(p => p.Settings, (new List <zAppDev.DotNet.Framework.Identity.Model.ProfileSetting>
            {
                _applicationsystembo_settings_parentprofile,
                _applicationsystembo_settings_parentprofile2
            }))
            .VerifyTheMappings();
        }
Пример #2
0
 public void DeleteProfileSetting(zAppDev.DotNet.Framework.Identity.Model.ProfileSetting profilesetting, bool doNotCallDeleteForThis = false, bool isCascaded = false, object calledBy = null)
 {
     if (profilesetting == null || profilesetting.IsTransient())
     {
         return;
     }
     profilesetting.ParentProfile = null;
     if (!doNotCallDeleteForThis)
     {
         Delete <zAppDev.DotNet.Framework.Identity.Model.ProfileSetting>(profilesetting, isCascaded);
     }
 }