|
|
@ -45,9 +45,9 @@ namespace PlexRequests.Core
|
|
|
|
public long AddRequest(int providerId, RequestedModel model)
|
|
|
|
public long AddRequest(int providerId, RequestedModel model)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var entity = new RequestBlobs { Type = model.Type, Content = ReturnBytes(model), ProviderId = model.ProviderId };
|
|
|
|
var entity = new RequestBlobs { Type = model.Type, Content = ReturnBytes(model), ProviderId = model.ProviderId };
|
|
|
|
|
|
|
|
|
|
|
|
var id = Repo.Insert(entity);
|
|
|
|
var id = Repo.Insert(entity);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// TODO Keep an eye on this, since we are now doing 2 DB update for 1 single request, inserting and then updating
|
|
|
|
model.Id = (int)id;
|
|
|
|
model.Id = (int)id;
|
|
|
|
|
|
|
|
|
|
|
|
entity = new RequestBlobs { Type = model.Type, Content = ReturnBytes(model), ProviderId = model.ProviderId, Id = (int)id };
|
|
|
|
entity = new RequestBlobs { Type = model.Type, Content = ReturnBytes(model), ProviderId = model.ProviderId, Id = (int)id };
|
|
|
|