We are selecting records from a table AdditionalDetail
; this works fine, but it returns data for FullDetails
also, which is another model.
如何从<条码>中获取记录,只从<条码>中获取记录? 我要说的是,<代码>AmountPaid,其中少量的浏览量不是问题,而是在一份大的数据清单中,它是一个业绩问题。
我们正在利用伙伴关系。 NET Web AP。
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.