Created
February 14, 2020 00:49
-
-
Save carloscds/952cba36cca6792052cfff182f5b077f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Ninject; | |
namespace ExemploNInject | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Ninject.IKernel inject = new StandardKernel(); | |
inject.Bind<IServico>().To<MeuServico>(); | |
var obj = inject.Get<ExecutaDI>(); | |
obj.Executa(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment