public TResource GetOrCreate() { if (ResourceIdsHolder.IsEmpty <TResource>()) { return(Create().Value); } else { var id = ResourceIdsHolder.GetLast <TResource>(); return(ResourceQuery.Get(id).Value); } }
public TResource GetIfExist() { var id = ResourceIdsHolder.GetLast <TResource>(); return(id == null ? null : ResourceQuery.Get(id).Value); }
public ActionResult Delete() { return(Delete(ResourceIdsHolder.GetLast <TResource>())); }