- Dirty reads occur when:
- Transaction A inserts a row into a table.
- Transaction B reads the new row.
- Transaction A rolls back.
- Nonrepeatable reads occur when:
- Transaction A reads a row.
- Transaction B changes the row.
- Transaction A reads the same row a second time and gets the new results.
- Phantom reads occur when:
- Transaction A reads all rows that satisfy a WHERE clause on an SQL query.
- Transaction B inserts an additional row that satisfies the WHERE clause.
- Transaction A re-evaluates the WHERE condition and picks up the additional row.
Implement Factory pattern using generics public interface IDoWork { string DoWork(); } Declare an Interface first by abstracting the common functionality Here I am taking the example of DoWork public class Manager : IDoWork { public string DoWork() { return "Manager Manages School" ; } } Implement the IDoWork in concrete classes as shown public class Teacher : IDoWork { public string DoWork() { return "Teacher teaches student in school" ; ...
Comments
Post a Comment