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

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