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 UpdateBranchAsync(Branch branch)
        {
            using (var ctx = GetContext())
            {
                Branch dbBranch = await ctx.Branches.FindAsync(branch.Id).ConfigureAwait(false);

                dbBranch.BranchDisplayName = branch.BranchDisplayName;
                dbBranch.BranchRootUrl = branch.BranchRootUrl;

                await ctx.SaveChangesAsync().ConfigureAwait(false);
            }
        }
 public async Task UpdateBranchAsync(Branch branch)
 {
     await _dataService.UpdateBranchAsync(branch).ConfigureAwait(false);
     _cacheService.Invalidate(CacheKeys.Branches);
 }
 public async Task CreateBranchAsync(Branch branch)
 {
     using (var ctx = GetContext())
     {
         ctx.Branches.Add(branch);
         await ctx.SaveChangesAsync().ConfigureAwait(false);
     }
 }