now I'll try describe my situation correctly: I have 2 models with same properties here is this models:
[Table("OperatorA")]
public class OperatorA
{
[Key]
public string Id { get; set; }
public string Number { get; set; }
public string CallTime { get; set; }
public string Duration { get; set; }
public decimal Cost { get; set; }
}
And
[Table("OperatorB")]
public class OperatorB
{
[Key]
public string Id { get; set; }
public string Number { get; set; }
public string CallTime { get; set; }
public string Duration { get; set; }
public decimal Cost { get; set; }
}
After that I have inserted data in this tables and everything works fine, but -
now I need compare this two tables:
1. Check duplicate Number property in both table and view theme.
and
2. View all Number values that is not duplicate.
Can anyone help me with controller.
public async Task<ActionResult> Index()
{
var operatorA = await db.OperatorAs.ToListAsync();
var operatorB = await db.OperatorBs.ToListAsync();
// Want get all operatorB Numbers witch not equals OperatorA Numbers
}