public void AddActivityToAnalysisRequest(AnalysisRequest request, AnalysisRequestActivity activity) { request.Activities.Add(activity); activity.Date = DateTime.Now; activity.AnalysisRequest = request; context.SaveChanges(); }
public void AddActivityToAnalysisRequest(int requestId, AnalysisRequestActivity activity) { var request = Get(requestId); request.Activities.Add(activity); activity.Date = DateTime.Now; activity.AnalysisRequest = request; context.SaveChanges(); }