Esempio n. 1
0
 public CategoryService(ForumsDbContext context)
 {
     _context = context;
 }
Esempio n. 2
0
 public UserService(ForumsDbContext context)
 {
     _context = context;
 }
Esempio n. 3
0
 public PostService(ForumsDbContext context)
 {
     _context = context;
 }
Esempio n. 4
0
 public CommentService(ForumsDbContext context)
 {
     _context = context;
 }
Esempio n. 5
0
 public SubforumService(ForumsDbContext context)
 {
     _context = context;
 }
Esempio n. 6
0
 public ApplicationUserService(ForumsDbContext context)
 {
     this.context = context;
 }
Esempio n. 7
0
        // Working with data providers


        // Connect to a data source by using a generic data access interface


        // Handle and diagnose database connection exceptions
        // SqlException


        // Manage exceptions when selecting, modifying data


        // Build command objects and query data from data sources


        // Retrieve data source by using the DataReader


        // Manage data by using the DataAdapter and TableAdapter


        // Updating data


        // Query data sources by using EF


        // Code First to existing DB


        // Entity Data Modeling Fundamentals


        // Creating a Model


        // Including & excluding types/properties


        // Keys


        // Modeling a Many-to-Many Relationship


        // Querying Data


        // Basic queries


        // Load related data(joins, include vs thenInclude)


        // Client vs server query evaluation


        // Tracking vs.No-Tracking


        // Raw SQL


        // How query works(when execution of query performed)


        // Tagging Query


        // Data modification


        // Save data


        // Related data


        // Cascade delete


        // Disconnected entities
        public void DisconnectedEntities()
        {
            using (var context = new ForumsDbContext(new Microsoft.EntityFrameworkCore.DbContextOptions <ForumsDbContext>()))
            {
            }
        }