static RectangleShape FromJson(RectangleDetail detail)
        {
            var shape = RectangleShape.GetById(detail.Id) ?? new RectangleShape();

            shape.Id    = detail.Id;
            shape.Color = detail.Color;
            return(shape);
        }
 public bool Delete(Guid id)
 {
     try
     {
         var shape = RectangleShape.GetById(id);
         shape.MarkForDeletion();
         shape.Save();
         return(true);
     }
     catch (NullReferenceException ex)
     {
         return(false);
     }
 }
 public RectangleDetail FindById(Guid id)
 {
     return(ToJson(RectangleShape.GetById(id)));
 }