Exemple #1
0
 public TResource GetOrCreate()
 {
     if (ResourceIdsHolder.IsEmpty <TResource>())
     {
         return(Create().Value);
     }
     else
     {
         var id = ResourceIdsHolder.GetLast <TResource>();
         return(ResourceQuery.Get(id).Value);
     }
 }
Exemple #2
0
        public TResource GetIfExist()
        {
            var id = ResourceIdsHolder.GetLast <TResource>();

            return(id == null ? null : ResourceQuery.Get(id).Value);
        }
Exemple #3
0
 public ActionResult Delete()
 {
     return(Delete(ResourceIdsHolder.GetLast <TResource>()));
 }