Created
January 2, 2024 14:15
-
-
Save vmussak/488e97fceae9294241a107b0731ac997 to your computer and use it in GitHub Desktop.
Exemplo de injeção de dependência com .NET
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
public interface IMensagem | |
{ | |
string RetornaMensagem(string nome); | |
} | |
public class MensagemBoasVindas : IMensagem | |
{ | |
public string RetornaMensagem(string nome) | |
{ | |
return $"Olá {nome}, estamos felizes em lhe receber!"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment