What does AddTablesWithEntityFramework() vs AddTables(new MobileAppTableConfiguration()?

237 Views Asked by At

I have been using

.AddTables(new MobileAppTableConfiguration()
    .MapTableControllers()
    .AddEntityFramework()) 

to setup my MobileAppConfiguration, but recently saw in Adrian Hall's book https://adrianhall.github.io/develop-mobile-apps-with-csharp-and-azure/chapter2/custom/

.AddTablesWithEntityFramework()

How are these different? Should I be using the latter?

This call comes in Startup.cs in a standard Azure Mobile App, e.g.,

    public static void SetupMobileApp(IAppBuilder app, IKernel kernel)
    {
        HttpConfiguration config = new HttpConfiguration();

        //new MobileAppConfiguration()
        //    .UseDefaultConfiguration()
        //    .ApplyTo(config);

        new MobileAppConfiguration()
            .MapApiControllers()
            .AddTables(new MobileAppTableConfiguration()
                .MapTableControllers()
                .AddEntityFramework())                
            .AddPushNotifications()
            .MapLegacyCrossDomainController()
            .ApplyTo(config);
1

There are 1 best solutions below

0
Dominique Alexandre On BEST ANSWER

It's the same thing, it only sets the default settings for EntityFramework with TableController. Source.