private SiteSetting Translate(DbSiteSetting dbRecord)
 {
     return(new SiteSetting
     {
         SiteSettingId = dbRecord.SiteSettingId,
         SettingName = dbRecord.SettingName,
         SettingValue = dbRecord.SettingValue,
         LastModifiedByUserId = dbRecord.LastModifiedByUserId ?? -1,
         DateCreated = dbRecord.CreatedOnDate ?? new DateTime(),
         DateUpdated = dbRecord.LastModifiedOnDate ?? new DateTime()
     });
 }
        public async override Task <SiteSetting> Create(SiteSetting entity)
        {
            var dbRecord = new DbSiteSetting
            {
                SettingName          = entity.SettingName,
                SettingValue         = entity.SettingValue,
                CreatedByUserId      = entity.LastModifiedByUserId,
                CreatedOnDate        = DateTime.UtcNow,
                LastModifiedByUserId = entity.LastModifiedByUserId,
                LastModifiedOnDate   = DateTime.UtcNow,
                CultureCode          = null
            };

            Uow.DbContext.SiteSettings.Add(dbRecord);

            await Uow.SaveChanges();

            return(Translate(dbRecord));
        }