I have the following situation:
A project
MyCompany.MyProject.Domain
which contains my domain model, and partial classes (such asContact
).I want to 'extend' (by partial class, not extension method) my
Contact
class with a propertySlug
which will give me a simple URL friendly text representation of first and last name.I have a string extension method
ToSlug()
in myUtility
projectMyCompany.MyProject.Utilities
which does exactly what I want in 2).The problem: My
Utility
project is already referencing myDomain
project which means that I can't get theDomain
project to see theUtility
project'sToSlug()
method without causing circular reference.
I'm not keen on creating another project to solve this, and I really want to keep the Slug
logic shared.
How can I solve this?