It is opted by MS as standard framework for .Net & .Net core
Xunit is a cross platform
Comparison:
https://www.lambdatest.com/blog/nunit-vs-xunit-vs-mstest/
https://www.c-sharpcorner.com/UploadFile/Santhi.M/comparison-of-unit-testing-tools-in-net/
It is opted by MS as standard framework for .Net & .Net core
Xunit is a cross platform
Comparison:
https://www.lambdatest.com/blog/nunit-vs-xunit-vs-mstest/
https://www.c-sharpcorner.com/UploadFile/Santhi.M/comparison-of-unit-testing-tools-in-net/
AZ-400
Microsoft DevOps Engineer Expert(AZ-400)
DevOps Life Cycle :
DevOps Tools
Source control tools
1) Azure Repos Git
2) Bitbucket cloud
3) GitHub
4) GitHub Enterprise Server
5) Other Git
6) Subversion
Pipeline Tasks:
https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/?view=azure-devops
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Comparison
https://www.youtube.com/watch?v=OmRxKQHtDbY
Compare with the below factors
1) Scalability - is good in all four tools
2) Easy to setup - Except Ansible, remaining tools user Master-Agent concept to install the configured
3) Availability - all four supports
4) Management - Puppet & CHEF follows pull configuration and Ansible & SaltStack follows push configuration. Ansible & SaltStack both uses YAML(PYTHON). Puppet uses DSL language and CHEF uses DSL(RUBY).
5) Interoperability: All server(Puppet chef,etc.,) machines uses Linux/Unix and agents supports windows
Final conclusion : Ansible is the best configuration tool out of 4 tools.
Monitoring Tools:
Nagios, Splunk, Amazon cloud watch
Nagios has large market share in the IT industry.
Learn Below Important topics
VM Scale Set , VM Load balancer, Availability Set, Availability Zone, Application Ingights
Virtual network, Network Interface, Subnet, IP address Range
=========================================================================
Deploying the application from VS to VM
To become a Microsoft Certified DevOps Engineer Expert, first take either AZ-104 or AZ-204. Then, take AZ-400. These exams will teach you to effectively manage DevOps processes and integrations between Microsoft and the various DevOps tools.
1) To deploy the code from Visual studio to Windows server then we should create a new VM and install MANAGEMENT SERVICE from server explorer and IIS. Install web Deploy and .net framework bundle in the VM
Custom Script Extension
If we want to install any software's or add users to the Admin group then we can make use of this feature.
PS Desired State Configuration
DSC will install the same as CSE but it will make sure that the installed s/w is present in the system with the help of Azure Automation service. If some deletes that required then DSC will install again.
DevOps process templates:
https://docs.microsoft.com/en-us/azure/devops/boards/work-items/guidance/choose-process?view=azure-devops&tabs=basic-process
Basic, Agile, Scrum & CMMI
Multi tenant Authentication:
https://www.youtube.com/watch?v=BJXqrI1nabk
Access token :
The default lifetime of an access token is variable. When issued, an access token's default lifetime is assigned a random value ranging between 60-90 minutes (75 minutes on average).
SAML :
The default lifetime of the token is 1 hour
VM:
Creating a VM needs VNet, NIC, NSG, Private ,public IP.
NIC is assigned when a new VM created
Transferring data in the form of packets send and receive through NIC
NSG assigned to the NIC and it a firewall.
To run ASP.NET core application in Linux,
install Kestrel web server in the Linux machine
Publish code to the folder
Copy the folder to the server
Install .Net core framework SDK 3.1
Install Win SCP tool to copy the published files to the Linux VM.
Kestrel web server runs the application locally inside the Linux VM.
If we want to make it publicly available then we need to install NGINX web server.
NGNIX will redirects the request to the http://localhost:5000
Recovery Service vault:
We can take the backup of a vm using this service.
Recovery service vault should be present at same location where the VM is present.
It will take the incremental backup from the server.
We have 3 different backup policies
1) File 2) VM 3) Disk recovery
We can create backup policy according to our requirement.
We can restore the VM from Backup point.
A Recovery Services vault must be in the same location as the virtual machines being protected. If you have virtual machines in multiple regions, create a Recovery Services vault in each region.
Disaster recovery:
VM: Enable this from the VM -> Disaster recovery & choose the resources to create tartget.
Storage Account:
Microsoft recommends RA-GZRS for maximum availability and durability for your applications.
An important part of a disaster recovery plan is preparing to fail over to the secondary endpoint in the event that the primary endpoint becomes unavailable.
AppService:
Backup -> Configure -> choose the details to proceed further.
Sql Server or DB:
Enable Auditing.
Azure Recovery Services contributes to your BCDR strategy:
Design Patterns:
https://www.c-sharpcorner.com/UploadFile/nipuntomar/creational-design-pattern-for-net/
https://www.c-sharpcorner.com/UploadFile/nipuntomar/structural-design-pattern-for-net/
https://www.c-sharpcorner.com/UploadFile/nipuntomar/behavioral-design-pattern-for-net-part-1/
SOLID Principles:
Single Responsibility Principle (SRP): High cohesion and Loosely couples design is preferred.
refer UDEMY course
--------------------------------------------------------------------------------------------------------------------
Default access specifier of the class members is 'Private
Object class is the 'Default parent class
Base keyword is used to refer to the members of the parent class
Default class access specifier is internal.
Sealed class- can't be inherited further
Sealed method - can't be overridden further.
Static classes are sealed and therefore cannot be inherited.
Q: If we want to make a class not accessible to anyone?
A: Define private constructor
Q: Restrict a class not to be accessible to any other except child class?
A: Define constructor of a class protected.
Q: throw vs throws
A:
throw | throws |
---|---|
throw keyword is used to throw an exception explicitly. | throws keyword is used to declare one or more exceptions, separated by commas. |
Only single exception is thrown by using throw. | Multiple exceptions can be thrown by using throws. |
throw keyword is used within the method. | throws keyword is used with the method signature. |
Read about delegates.
Delegate is a class, which is used to create and invoke delegates at runtime.
A delegate in C# is similar to a function pointer in C or C++
delegates are object-oriented type-safe and very secure as they ensure that the signature of the method being called is correct.
Events and delegates work together. An event is a reference to a delegate i.e. when an event is raised, a delegate is called.
Func, Action & Predicate.
https://www.c-sharpcorner.com/UploadFile/puranindia/C-Sharp-interview-questions/
constant vs readonly
lazy loading vs eager loading
Tasks and threads in .NET and classes
App Domain:
Asp.Net introduces the concept of an Application Domain which is shortly known as AppDomain. It can be considered as a Lightweight process which is both a container and boundary. The .NET runtime uses an AppDomain as a container for code and data, just like the operating system uses a process as a container for code and data. As the operating system uses a process to isolate misbehaving code, the .NET runtime uses an AppDomain to isolate code inside of a secure boundary.
can destructors cause deadlocks
SQL: execution plans