public async Task UpsertUserTimeClocks(IEnumerable <UserTimeClock> userTimeClocks) { try { using (var context = new SFIntegrationContext()) { await context.BulkMergeAsync(userTimeClocks, options => options.ColumnInputExpression = entity => new { entity.UserId, entity.ProjectId, entity.JobOrderId, entity.ActivityId, entity.StartDate, entity.StartTime, entity.EndTime } ); } } catch (Exception e) { Debug.WriteLine(e.Message); _logger.Error(e, "Error in UpsertUserTimeClocks"); } }
public async Task UpsertTimeSheetActivities(IEnumerable <TimeSheetActivity> timeSheetActivities) { using (var context = new SFIntegrationContext()) { await context.BulkMergeAsync(timeSheetActivities); } }