This is a migrated thread and some comments may be shown as answers.

Unused return shapes

3 Answers 37 Views
Data Access Free Edition
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Doron
Top achievements
Rank 1
Doron asked on 10 Jul 2013, 09:30 AM
Is there a way to clear an unused return shape when i remove its domain method?

or some way to easily identify such unused return shapes so i can remove them manually?

3 Answers, 1 is accepted

Sort by
0
Doroteya
Telerik team
answered on 12 Jul 2013, 11:13 AM
Hello,

The easiest way to permanently delete the result set of a domain method that is removed from the context is in Model Object Explorer. I would suggest to you the following workflow:

1. Open the domain model in Visual Designer and navigate to Model Object Explorer
2. Expand the Domain Methods Return Shapes node
3. Right-click on the type you want to delete (you can select more then one type at once) and select Delete
4. Save the .rlinq file

Note that, once the domain model is saved after the types are removed, OpenAccess ORM will remove the generated .cs\.vb files and if these types are already used in your code, you will experience build errors.

Regarding the distinction between used and unused return shapes - currently, when the visual representation in Model Object Explorer is created, OpenAccess ORM does not explicitly check, if the domain method that used to own the return shape still exists. The point here is that even if it does not, that type might be used somewhere in your code. 

A manual workaround would be to review the Domain Method Return Shape property of the domain methods in (the Domain Methods node) and based on the used return shapes to filter the unused ones.

I hope this helps. If you have additonal questions, or experience difficulties, do not hesitate to get back to us.


Regards,
Doroteya
Telerik
OpenAccess ORM Q2 2013 brings you a more powerful code generation and a unique Bulk Operations support with LINQ syntax. Check out the list of new functionality and improvementsshipped with this release.

0
Doron
Top achievements
Rank 1
answered on 31 Jul 2013, 08:18 AM
this does NOT answer my question
i know how to remove it manually - my problem is to identify what should be removed
when we have several people all defining stored procedures and result shapes in the same model - the fact that when you remove the domain method - you do not remove the return shape that was generated with it means that the model accumulate garbage - how do i identify this garbage?
0
Accepted
Doroteya
Telerik team
answered on 05 Aug 2013, 08:46 AM
Hello Doron,

Excuse me for the inconvenience caused.

I understand your concerns about garbage accumulation and unfortunately Telerik OpenAccess ORM does not offer a functionality that marks the stored procedure return shapes as used or unused. We appreciate the idea, however, and here is a feature request about the implementation of a visual difference between return shapes which have an owning domain method and such which do not.

I hope this helps. If you have additional questions, do not hesitate to get back to us.


Regards,
Doroteya
Telerik
OpenAccess ORM Q2 2013 brings you a more powerful code generation and a unique Bulk Operations support with LINQ syntax. Check out the list of new functionality and improvementsshipped with this release.

Tags
Data Access Free Edition
Asked by
Doron
Top achievements
Rank 1
Answers by
Doroteya
Telerik team
Doron
Top achievements
Rank 1
Share this question
or