question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

What is the difference between create(), createInstance() and inject()

See original GitHub issue

Some examples use createInstance(), other use create(). I’ve also seen an inject()

What is the difference between all those primitives ?

Could it be explained in the doc ?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jmdobrycommented, Sep 22, 2016
  • createInstance - Instantiate an in-memory, unsaved record
  • inject - Insert a record (an already saved record) into the in-memory datastore
  • create - Insert a new record into the database, post a new record to the REST api, etc. This method is asynchronous, as it’s making an RPC call.
0reactions
Offirmocommented, Sep 25, 2016

Thanks !

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - How to create instance of a class and inject services?
and I can create instance and inject services: ... { Provider = provider; } public IActionResult Index() { var instance = ActivatorUtilities.
Read more >
Activator utilities: activate anything! - On The Drift
CreateInstance<MyController>(ServiceProvider); ActivatorUtilities will now create an instance of MyController by calling its constructor with any dependencies ...
Read more >
Dependency injection guidelines - .NET | Microsoft Learn
Learn various dependency injection guidelines and best practices for .NET application development.
Read more >
28. Create instance for the Services using Test Bed inject ...
In this video we will see how to create instance for the services using the Test Bed Inject Method - Angular Unit Testing....
Read more >
dependency injection on activator createinstance reflection
So basically you have to make sure there is only one constructor. And that constructor either have to be parameterless or only contain...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found