Se hizo toda la parte del Unit Of Work y estoy a punto de terminar la de tests unitarios
This commit is contained in:
Alejandro Sarmiento
2024-02-28 22:40:34 +01:00
parent b55f2be085
commit 81a3e91d6e
67 changed files with 1112 additions and 1375 deletions

View File

@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.9.34607.119
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MandarCorreo", "MandarCorreo\MandarCorreo.csproj", "{9033A5CD-22DD-40DF-907F-E7F23A6CB5C6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9033A5CD-22DD-40DF-907F-E7F23A6CB5C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9033A5CD-22DD-40DF-907F-E7F23A6CB5C6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9033A5CD-22DD-40DF-907F-E7F23A6CB5C6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9033A5CD-22DD-40DF-907F-E7F23A6CB5C6}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {CB12919E-932A-4A8F-870B-DFE108FDD721}
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,28 @@
using System.Net.Mail;
using System.Net;
try
{
SmtpClient client = new SmtpClient("mail.asarmiento.es", 587)
{
Credentials = new NetworkCredential("alejandro@asarmiento.es", "Toledo.480200"),
EnableSsl = true
};
MailMessage mailMessage = new MailMessage
{
From = new MailAddress("alejandro@asarmiento.es"),
Subject = "Vacaciones de este año",
Body = "Este año me da que no vamos a tener vacaciones =(",
IsBodyHtml = false,
};
mailMessage.To.Add("alejandro.sarsan@gmail.com");
client.Send(mailMessage);
Console.WriteLine("Correo enviado con éxito.");
}
catch (Exception ex)
{
Console.WriteLine("No se pudo enviar el correo. Error: " + ex.Message);
}