public async Task DeleteForm(string ids) { long[] idArr = TextHelper.SplitToArray <long>(ids, ','); foreach (var id in idArr) { StudentInfoEntity entity = new StudentInfoEntity(); await entity.Modify(); entity.Id = id; entity.BaseIsDelete = 1; await this.BaseRepository().Update <StudentInfoEntity>(entity); } //await this.BaseRepository().Delete<StudentInfoEntity>(idArr); }
public async Task SaveForm(StudentInfoEntity entity) { if (entity.Id.IsNullOrZero()) { await entity.Create(); await this.BaseRepository().Insert(entity); } else { await entity.Modify(); await this.BaseRepository().Update(entity); } }