Created
          February 12, 2017 16:06 
        
      - 
      
 - 
        
Save renatogroffe/f4d27505b73ae7beb138ae4657e07033 to your computer and use it in GitHub Desktop.  
  
    
      This file contains hidden or 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 APICotacoes | |
| { | |
| public class CotacoesContext : DbContext | |
| { | |
| public DbSet<Cotacao> Cotacoes { get; set; } | |
| public CotacoesContext(DbContextOptions<CotacoesContext> options) : | |
| base(options) | |
| { | |
| } | |
| protected override void OnModelCreating(ModelBuilder modelBuilder) | |
| { | |
| modelBuilder.Entity<Cotacao>().HasKey(c => c.Sigla); | |
| } | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment