Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Create console app/webjob that uses AbpBootstrapper that uses EntityFrameworkCore ? #6346


User avatar
0
adudley created

Hi

would you be able to point me in the right direction, or preferrably to some code that

For Asp.NetCore

  1. starts a console app
  2. loads up all the apb IoC stuff
  3. enables entity framework entities that already exist as part of the standard template, along with the Core (domain) layer so I can put common code to use
  4. Reads anything from any table as an example or call some common Core code that reads.

I've looked in a few places. but can't quite see how this fits together yet. https://github.com/aspnetboilerplate/aspnetboilerplate/blob/e0ded5d8702f389aa1f5947d3446f16aec845287/test/Abp.Zero.SampleApp.EntityFrameworkCore.ConsoleAppTest/Program.cs

and https://github.com/aspnetboilerplate/aspnetboilerplate-samples/tree/master/AbpEfConsoleApp

is that the answer, to re-create the entity model? like in the AbpEfConsoleApp ?

thanks for your help


5 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    The example above is almost. You can practice it, If you have questions, welcome feedback.

  • User Avatar
    0
    adudley created

    Hi
    sorry no i cant get this to work, im pretty new to the Core way of starting applications

    asp net boilerplate has a full example of how to get hangfire working in a console app

    that would be great if you guys have that same thing but using Core

    is it possible to het this working as a webjob and ise existing entities? ive hired someone whos ised asp net boilerplate for many more years than me and he's also struggling considerably so far

    thanks for any assistance

    just want to use your great framwork but on a separate background process

  • User Avatar
    0
    ismcagdas created
    Support Team
  • User Avatar
    0
    adudley created

    Hi @ismcagdas yes thanks i did, but since it dosn't use the Core version of asp net boilerplate, is not quite there. Tried to convert it but coudn't get it there.

    Given the core version is now the only version asp net zero are adding to in the future (https://docs.aspnetzero.com/documents/zero/latest/Version-Differences) you'd think the team would update the samples or add to them maybe?

  • User Avatar
    2
    adudley created

    Just to let you know, having mapped out all the dependencies for abp and abp zero, then looking into modules, it makes more sense now.

    I've a console app working with dependency injection... infact, the simplest thing to say would be...

    just copy the .migrations project

    I'll be able to fit in webjobs into a working console app without much trouble I would think. I'll let you know.