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
namespace Patterns.AbstractFactory.Interfaces | |
{ | |
/// <summary> | |
/// Interface responsável por definir quais faturamentos serão implementados | |
/// </summary> | |
public interface IFaturamentoFactory | |
{ | |
/// <summary> | |
/// Método responsável por Processar o faturamento das notas de diversos clientes | |
/// </summary> |
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; | |
namespace Patterns.AbstractFactory.Interfaces | |
{ | |
/// <summary> | |
/// Interface responsável por assinar o método de geração de faturas para apenas um cliente. | |
/// </summary> | |
public interface IFaturamentoIndividual | |
{ | |
String GerarFaturasIndividual(); |
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; | |
namespace Patterns.AbstractFactory.Interfaces | |
{ | |
/// <summary> | |
/// Interface responsável por assinar o método de geração de faturas para diversos Clientes. | |
/// </summary> | |
public interface IFaturamentoLote | |
{ | |
String GerarFaturasLote(); |
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 Patterns.AbstractFactory.Faturamentos; | |
using Patterns.AbstractFactory.Interfaces; | |
namespace Patterns.AbstractFactory.Factories | |
{ | |
/// <summary> | |
/// Classe responsável por realizar o faturamento de pessoa física | |
/// </summary> | |
public class FaturamentoPessoaFisica : IFaturamentoFactory | |
{ |
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 Patterns.AbstractFactory.Faturamentos; | |
using Patterns.AbstractFactory.Interfaces; | |
namespace Patterns.AbstractFactory.Factories | |
{ | |
/// <summary> | |
/// Classe responsável por realizar o faturamento de pessoa jurídica | |
/// </summary> | |
public class FaturamentoPessoaJuridica : IFaturamentoFactory | |
{ |
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 Patterns.AbstractFactory.Interfaces; | |
namespace Patterns.AbstractFactory.Faturamentos | |
{ | |
public class Faturamento640 : IFaturamentoLote | |
{ | |
public string GerarFaturasLote() | |
{ | |
return "Faturas geradas para 10 empresas."; | |
} |
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 Patterns.AbstractFactory.Interfaces; | |
namespace Patterns.AbstractFactory.Faturamentos | |
{ | |
public class Faturamento641 : IFaturamentoIndividual | |
{ | |
public string GerarFaturasIndividual() | |
{ | |
return "Fatura gerada para a empresa Bom Negócio Ltda."; | |
} |
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 Patterns.AbstractFactory.Interfaces; | |
namespace Patterns.AbstractFactory.Faturamentos | |
{ | |
public class Faturamento920 : IFaturamentoLote | |
{ | |
public String GerarFaturasLote() | |
{ | |
return "Faturas geradas com sucesso para 500 clientes."; |
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 Patterns.AbstractFactory.Interfaces; | |
namespace Patterns.AbstractFactory.Faturamentos | |
{ | |
public class Faturamento921 : IFaturamentoIndividual | |
{ | |
public string GerarFaturasIndividual() | |
{ | |
return "Fatura gerada para o cliente João da Silva."; | |
} |
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 Microsoft.EntityFrameworkCore; | |
namespace RepositoryPattern | |
{ | |
public class GenericContext<T> : DbContext where T : Entidade | |
{ | |
public DbSet<T> Entity { get; set; } | |
public GenericContext() | |
{ |
OlderNewer