<p>I have a question that I may be over thinking at this point but here goes...</p>

<p>I have 2 classes Users and Groups. Users and groups have a many to many relationship and I was thinking that the join table group_users I wanted to have an IsAuthorized property (because some groups are private -- users will need authorization). </p>

<p><strong>Would you recommend creating a class for the join table as well as the User and Groups table?</strong> Currently my classes look like this.</p>

<pre><code>public class Groups
{
    public Groups()
    {
        members = new List&lt;Person&gt;();
    }
    ...
    public virtual IList&lt;Person&gt; members { get; set; }
}

public class User
{


    public User()
    {
       groups = new Groups()
    }
    ...
    public virtual IList&lt;Groups&gt; groups{ get; set; }

}
</code></pre>

<p>My mapping is like the following in both classes (I'm only showing the one in the users mapping but they are very similar):</p>

<pre><code>HasManyToMany&lt;Groups&gt;(x =&gt; x.Groups)
.WithTableName("GroupMembers")
.WithParentKeyColumn("UserID")
.WithChildKeyColumn("GroupID")
.Cascade.SaveUpdate();
</code></pre>

<p><strong>Should I write a class for the join table that looks like this?</strong></p>

<pre><code>public class GroupMembers
{
    public virtual string GroupID { get; set; }
    public virtual string PersonID { get; set; }
    public virtual bool WaitingForAccept { get; set; }
}
</code></pre>

<p>I would really like to be able to adjust the group membership status and I guess I'm trying to think of the best way to go about this. </p>

[{'answer_id': 68591, 'author': 'dawnerd', 'author_id': 69503, 'author_profile': 'https://Stackoverflow.com/users/69503', 'pm_score': 2, 'selected': False, 'text': '<p>You could make an image with the watermark and then set the image as the background via css.</p>\n\n<p>For example:</p>\n\n<pre><code>&lt;style type="text/css"&gt;\n.watermark{background:url(urltoimage.png);}\n&lt;/style&gt;\n&lt;div class="watermark"&gt;\n&lt;p&gt;this is some text with the watermark as the background.&lt;/p&gt;\n&lt;/div&gt;\n</code></pre>\n\n<p>That should work.</p>\n'}, {'answer_id': 73352, 'author': 'Doug Kavendek', 'author_id': 9330, 'author_profile': 'https://Stackoverflow.com/users/9330', 'pm_score': 3, 'selected': False, 'text': '<p>As suggested, a png background could work, or even just an absolutely positioned png that sizes to fit the page, but you are asking in a comment about what would be a good tool to create one -- if you want to go with free, try <a href="http://www.gimp.org/" rel="noreferrer">GIMP</a>.  Create a canvas with a transparent background, add some text, rotate it and resize as you\'d like, and then reduce the layer\'s opacity to taste.</p>\n\n<p>If you\'d want it to cover the whole page, make a div with the class \'watermark\' and define its style as something like:</p>\n\n<pre>\n.watermark\n{\n   background-image: url(image.png);\n   background-position: center center;\n   background-size: 100%; /* CSS3 only, but not really necessary if you make a large enough image */\n   position: absolute;\n   width: 100%;\n   height: 100%;\n   margin: 0;\n   z-index: 10;\n}\n</pre>\n\n<p>If you really want the image to stretch to fit, you can go a little further and add an image into that div, and define its style to fit (width/height:100%;).</p>\n\n<p>Of course, this comes with a pretty important caveat: IE6 and some old browsers might not know what to do with transparent pngs.  Having a giant, non-transparent image covering your site would <em>certainly</em> not do.  But there are <a href="http://bjorkoy.com/past/2007/4/8/the_easiest_way_to_png/" rel="noreferrer">some hacks</a> to get around this, luckily, which you\'ll most likely want to do if you do use a transparent png.</p>\n'}, {'answer_id': 75339, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 2, 'selected': False, 'text': '<p>If you add "background-attachment: fixed" to the css in kavendek\'s suggestion above, you can "pin" the background image to the specified location in the window. That way, the watermark will always remain visible no matter where the user scrolls on the page. </p>\n\n<p>Personally, I find fixed background images to be visually annoying, but I\'ve heard site-owners say they love knowing that their logo or copyright notice (rendered as an image, presumably) is always right under the user\'s nose.</p>\n'}, {'answer_id': 2486786, 'author': 'user136776', 'author_id': 136776, 'author_profile': 'https://Stackoverflow.com/users/136776', 'pm_score': 5, 'selected': False, 'text': '<pre><code>&lt;style type="text/css"&gt;\n#watermark {\n  color: #d0d0d0;\n  font-size: 200pt;\n  -webkit-transform: rotate(-45deg);\n  -moz-transform: rotate(-45deg);\n  position: absolute;\n  width: 100%;\n  height: 100%;\n  margin: 0;\n  z-index: -1;\n  left:-100px;\n  top:-200px;\n}\n&lt;/style&gt;\n</code></pre>\n\n<p>This lets you use just text as the watermark - good for dev/test versions of a web page.</p>\n\n<pre><code>&lt;div id="watermark"&gt;\n&lt;p&gt;This is the test version.&lt;/p&gt;\n&lt;/div&gt;\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/68572', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1385358/']