Posts

Adapting a New Technology: A General Guide to keep Your Systems up-to-date

Image
Special Thanks to [Mohamed Othman](https://www.linkedin.com/in/mohammad-othman-55351b20b/) for his help in editing this blog. ## Introduction If you are generally working in the technology sector and specifically in the software industry, you will be under stress by the number of new things that are coming up every day. New stuff can be a new integration technology, a new framework, a language version upgrade, or even a new library that helps you to do specific tasks in your code. In this article we will refer to those as: "new Tech". And if you are like me, you will feel messed up if you don't know or know how to use the new trend! So here, I will list some tips and tricks, along with best practices for keeping your projects up-to-date. **Note**: the tips in this article for when and how to implement the new technology in your daily working projects are not concerned about keeping your knowledge up to date, knowing things and doing them are two different t

Adding Multiple DB Contexts in your DotNet Project

Introduction  In this article we will discuss adding multiple DB contexts to our DotNet projects, we will use EF core as our ORM to make a "Code First Database" approach.  In this article example, we will use DotNet 7 connecting to SQL Server through EF Core 7, all of this will be in a web API project to see how to define those DB contexts as services in program.cs  file.  You can download the example source code from here .  Why would we need multiple DB Contexts in our Solution?  There are two situations where you need multiple DB Context in your project or Solution:  We have a single database but need multiple  schemas in our database, and each scheme will have a group of entities.  We have Multiple databases and our project needs to connect them to do its operations.  We will take the first situation as our code example. Creating Our models Let's assume we have a simple solution that manages the cust

How to Automatically deploy Configuration Files with Azure DevOps CD pipelines

Introduction Part of the CI/CD Automation is to add environment-related configuration files through deployment automatically, rather than manually uploading them. This will provide less human error and more security by splitting the developer's responsibility of knowing the environment configuration or editing it, as to be handled by Operation side. We will take an example of CI for DotNet Core 6 WebApi project, and on that project, we need to copy the related appsetting.json to its environment. Pre-Requested Knowledge: To benefit from this article you need to be familiar with the following:  Azure DevOps. the Concept of CI/CD. Azure CI/CD Pipelines. DotNet Core Web Api Deployment (or similar). Adding From Source Code Branch In some cases, we will have configuration files included in our source code, for example, in

Build Multiple Repositories with Single Pipeline Introduction in Azure DevOps

Image
  This section discusses how to build multiple Repositories with a single pipeline. this could be needed when the feature you deliver may affect multiple code repositories and you need to ensure that all build together. The  resources  Section on the Pipeline To tell the pipeline about the other repositories that need to be built, you need to add the  resources  section before starting  steps  or  jobs  sections. let's see the  resources  section structure: resources : repositories : - repository : <RepositoryAliasName> type : git name : <AzureDevOps-ProjectName>/<RepositoryName> ref : <BranchName> The  resources  section contain sub-section  repositories , which contains one or multiple repository definitions. For each repository we need to define the following: repository  the value will be an alias name for the repository, this name will be used on another pipeline step  checkout . type : define where the repository is: git : if

Writing code is a mind and time-consuming process, a short story to prove

 Two days ago, while I’m trying to test a Customer module that I had codded, testing some data insertion from my code, I found out my insertion code on exception does not roll-back the insertion, I use to make this kind of transaction handling  at the DBMS on the sorted procedures, but I decided to make this from my code this time, so I searched that, and on C# .net you can use what called TransactionScope , which I implemented successfully, I wasted another hour on reading about the other types of transactions that available on .net framework, implicit and explicit , on one method or through the whole methods and across threads, “I hated threads!” I said, “Let's check about it … no! let’s get focused”.  So I continued my tests and based on some new requirements that I just remembered to do, I have to add forging a key relationship between the Customer table and Company table, that each customer MUST be linked to a company that s/he worked at, this is a simple change, right? The

Troubleshoot something you don't know!

One day, three years ago, I found my self supporting users that working on a solution/system for call center department called Avaya Elite, and somehow, I suppose not only to operationally support the system but also to make web application & desktop application that integrates with the earlier mentioned solution. The idea was simple, we have a solution that controls the Telephone Transactions on the company, part of its tools is a desktop application linked with an application server that's controlling the Inbound call center and the Outbound call Center . for the client desktop application, we need to link it with an application that shows information about the caller (in case of inbound) or information about the one who will be called (in case of outbound) from the company's ERP. The above was an overview, as I will not go farther in details on this, but I will describe the situation that I faced: There was no documentation provided from the solution supplier

Losing Work weight: Stop working sugar!

I am at the point of my life that, I stand over the weight scale and I feel it screaming from my overweight! I'm ashamed of my shape, my clothes did not fit my body anymore, and I feel heavy while I'm moving around. The weird thing that I do exercises! at some weeks every day, but I still gaining weight, still feels heavy as an elephant!  After watching this video , I understood why I'm having more weight even when I exercise, it's simple, the amount of calories that I'm taking from my food is more than what my body needs, so I decided to stop having sugar on my daily meals, it was hard I admit it, but I really felt healthier after tacking this decision, I can feel my mood changing during the day to be better, and less stress or boredom mood swings during the day and I can feel my body starting to transform into its fitness shape, That doesn't mean I'm fit right now and in good shape! but I can see a shred of real evidence that I'm going in t