public ActionResult <TResource> Create(TAlterResource createResource) { var response = Client.Create(createResource).Result; if (response.IsSuccess) { ResourceIdsHolder.Add <TResource>(response.Value.Id); } return(response); }
public ActionResult <TResource> Create() { var createResource = RandomResourceCreator.GetRandomCreateResource(); var response = Client.Create(createResource).Result; if (response.IsSuccess) { ResourceIdsHolder.Add <TResource>(response.Value.Id); } return(response); }
public ActionResult <IEnumerable <TResource> > Create(IEnumerable <TAlterResource> createResources) { var result = Client.BatchCreate(createResources.ToArray()).Result; if (result.IsSuccess) { foreach (var resource in result.Value) { ResourceIdsHolder.Add <TResource>(resource.Id); } } return(result); }