In all examples I have found about entity framework, they always use ICollection for object collections.
public partial class Standard
{
public Standard()
{
this.Students = new HashSet<Student>();
this.Teac...
I have the field descrPapel of type string and would like this field to be created as nullable , that is, accept null when doing some insert / update entity type.
using System;
using System.Collections.Generic;
usi...
I have the classes:
public class Estado {
public int Id { get; set; }
public string Nome { get; set; }
public string Uf{ get; set; }
public ICollection<Cidade> Cidade { get; set; }
}
public class Cidade {
public int...
Premise:
I'm using EntityFramework6 for data persistence in SQLServer.
At some point I need to write data in two different tables,
but the second table has dependency on the first example.
try{
MetodoPersisteNaTabelaA();
MetodoP...
Follow the code:
var fullEntries = dbContext.tbl_EntryPoint
.Join(
dbContext.tbl_Title,
combinedEntry => combinedEntry.entry.TID,
title => title.TID,
(combinedEntry, title) => new
{...
I'm trying to reproduce this example of EntityFramework with standard repository, as follows the link: link
But it is giving the error described in the topic title.
I'll post the codes.
The first is the class BancoContext.cs:
using...
I have a class where I need to have 2 different relationships with the same table.
public class Usuario
{
public int Naturalidade {set;get;}
public int CidadeEndereco {set;get;
}
public class Cidade
{
public int Id {se...
I need to migrate a system with SQLSERVER database to a PostGreSQL 9.3. I have never worked with PostGre before so I'm using Entity Framework 6 with model-first to make the process easier. The migration application is being developed in WPF. My...
What kind of attribute should I use to represent a column type oid of PostgreSQL with Entity Framework 6 Code-First?
Remembering that PostgreSQL's oid type is for storing files.