We are selecting records from a table AdditionalDetail; this works fine, but it returns data for FullDetails also, which is another model.
How to get records from AdditionalDetailAbstract model only? I want to update say AmountPaid, with small amount of rows it's not an issue, but in a big list of data, it's a performance issue.
We are using ASP.NET Web API.
var additionalData = dbContext.AdditionalDetail
.Where(c => c.AdditionalDetailId == 525 && c.CompanyId == 15)
.FirstOrDefault();
public abstract class AdditionalDetailAbstract
{
[Key]
public long AdditionalDetailId { get; set; }
public long DetailsId { get; set; }
public long CompanyId { get; set; }
public decimal AmountToBePay { get; set; }
public decimal AmountPaid { get; set; }
}
public class AdditionalDetail : AdditionalDetailAbstract
{
public CaseDetail FullDetails { get; set; }
}
How to deal with it? So I can update only AdditionalDetailAbstract model data.
