public async Task <IProviderResponse <IStudent> > Create(IStudent studentEntity) { studentEntity.StudentId = string.Format(_studentKeyFormat, Guid.NewGuid().ToString()); return(await _studentRepoWorker.ProcessAsync(bucket => bucket.UpsertAsync <Student>(studentEntity.StudentId, (studentEntity as Student)))); }
public async Task <IProviderResponse <IClass> > Create(IClass classEntity) { return(await _classRepoWorker.ProcessAsync(bucket => bucket.UpsertAsync <Class>(classEntity.Code, (classEntity as Class)))); }