Closed mrreddevil2412 closed 8 months ago
var list=db.Quyerable
var list=db.Quyerable().Where(exp) .Include(x=>x.ProcessHitory ) .Include(x=>x.VoucherSend ) .Include(x=>x.LogApprove ) .ToList();
Thanks brO!
Can Includes be used with split tables?
Class Survey
SqlSugarCore 5.1.4.116-preview11 has a major update with split table support for includes
SqlSugarCore 5.1.4.116-preview11 has a major update with split table support for includes
Update, already supported, there are questions to send new isssues
Update, already supported, there are questions to send new isssues Thanks!
SqlSugarCore 5.1.4.116-preview11 has a major update with split table support for includes
it so cool. . I have a function to import excel. There are 2 columns Phone and CustomerCode I need to check before inserting into the table to make sure that record is unique Can you suggest me which function to use in sqlsugar
@DotNetNext SplitTable not support Join query???
LeftJoin(db.Queryable
LeftJoin(db.Queryable().Splitable() ,(x,y)=>x.id==y.xid)
Thanks, a tried
` var whereEx = Expressionable.Create()
.And((f) => !f.IsDeleted)
.And((f) => f.Point < 3 || f.Status != 4)
.AndIF(offices?.Count > 0, (f) => offices.Select(x => x.Id).Contains(f.UnitID))
.AndIF(model.StartDate > DateTime.MinValue, (f) => f.CreateTime > model.StartDate)
.AndIF(model.EndDate > DateTime.MinValue, (f) => f.CreateTime < model.EndDate)
.AndIF(model.TypeCustomer.IsNotEmptyOrNull(), (f) => model.TypeCustomer.ToInts().Contains(f.TypeCustomer))
.AndIF(model.TypeFeed.IsNotEmptyOrNull(), (f) => model.TypeFeed.ToInts().Contains(f.TypeFeedback))
.ToExpression();
var queryData = await GetFeedbackEntities(whereEx, offices, model);
foreach (var feedbackEntity in queryData) { feedbackEntity.ProcessHitory = await GetLogFeedbackEntities(feedbackEntity.Id); feedbackEntity.VoucherSend = await GetModSendVoucherEntity(feedbackEntity.Id); feedbackEntity.LogApprove = await GetApproveFeedbackEntities(feedbackEntity.Id); feedbackEntity.Revenue_KHL = await GetRevenueKHL(feedbackEntity.SID); feedbackEntity.Revenue_CTV = await GetRevenueCTV(feedbackEntity.IdPartner); }`
EntityClass
Currently, every time I do a for, I have to query to get the dependent object of obj feedbackEntity So do you have a better way to help me?