Git Product home page Git Product logo

Comments (2)

bruno-vferreira avatar bruno-vferreira commented on June 3, 2024

opa!

ja utilizei e foi mais ou menos assim

https://thedavidmasters.com/2019/01/30/using-autofac-in-azure-functions/

from equinoxproject.

pavini avatar pavini commented on June 3, 2024

Fala Bruno...

Olha.. avançou..

Como você configurou o contexto?

Eu fiz assim:

DependencyInjection.Initialize(builder =>

  {
                builder.RegisterType<CustomerRepository>().As<ICustomerRepository>();
                builder.RegisterType<EquinoxContext>().InstancePerRequest();
               
            }, functionName);

Recebo esse erro

Executed 'ConsultaTimeTrigger' (Failed, Id=ee858e2a-c1b0-4e8d-afbb-ac16d7e8fe16, Duration=126ms)
[2020-11-27T20:18:31.457Z] System.Private.CoreLib: Exception while executing function: ConsultaTimeTrigger. Microsoft.Azure.WebJobs.Host: Exception binding parameter 'teste'. Autofac: An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = CustomerRepository (ReflectionActivator), Services = [IntegraFacil.Domain.Interfaces.ICustomerRepository], Lifetime = Autofac.Core.Lifetime.CurrentScopeLifetime, Sharing = None, Ownership = OwnedByLifetimeScope ---> Unable to resolve the type 'IntegraFacil.Infra.Data.Context.EquinoxContext' because the lifetime scope it belongs in can't be located. The following services are exposed by this registration:

  • IntegraFacil.Infra.Data.Context.EquinoxContext

Nao sei se passou por isso.

from equinoxproject.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.