public bool ProcessResourceFile(Branch branch, BranchResourceFile file)
        {
            int branchId       = file.FK_BranchId;
            int resourceFileId = file.FK_ResourceFileId;

            string resxContent = _resourceFileLoader.GetAsString(file.SyncRawPathAbsolute, suppressExceptions: true);

            if (null != resxContent)
            {
                var stringResources = _resourceReader.ResxToResourceStringDictionary(new StringReader(resxContent));

                if (null != stringResources)
                {
                    try
                    {
                        return(ProcessResourceFile(branchId, resourceFileId, stringResources));
                    }
                    catch (Exception ex)
                    {
                        Trace.TraceError(ex.ToString());
                    }
                }
            }

            return(false);
        }
 public async Task CreateBranchResourceFileAsync(BranchResourceFile bresFile)
 {
     using (var ctx = GetContext())
     {
         ctx.BranchResourceFiles.Add(bresFile);
         await ctx.SaveChangesAsync().ConfigureAwait(false);
     }
 }
        public async Task UpdateBranchResourceFileAsync(BranchResourceFile bresFile)
        {
            using (var ctx = GetContext())
            {
                BranchResourceFile dbBranch = await ctx.BranchResourceFiles.FindAsync(bresFile.Id).ConfigureAwait(false);

                dbBranch.FK_BranchId         = bresFile.FK_BranchId;
                dbBranch.FK_ResourceFileId   = bresFile.FK_ResourceFileId;
                dbBranch.SyncRawPathAbsolute = bresFile.SyncRawPathAbsolute;

                await ctx.SaveChangesAsync().ConfigureAwait(false);
            }
        }
        public async Task UpdateBranchResourceFileAsync(BranchResourceFile bresFile)
        {
            await _dataService.UpdateBranchResourceFileAsync(bresFile).ConfigureAwait(false);

            _cacheService.Invalidate(CacheKeys.BranchResourceFiles);
        }