Note that there are some explanatory texts on larger screens.

plurals
  1. POCreating a repository with errors?
    text
    copied!<p>I am trying to create a Repository using the following tutorial <a href="http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/implementing-the-repository-and-unit-of-work-patterns-in-an-asp-net-mvc-application" rel="nofollow">http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/implementing-the-repository-and-unit-of-work-patterns-in-an-asp-net-mvc-application</a> I get these 2 errors.</p> <p>The type or namespace name 'IShowRepository' could not be found (are you missing a using directive or an assembly reference?) </p> <p>Metadata file 'C:\Users\Ben\Documents\Visual Studio 2010\Projects\StudentTheatreGroupWebsite\StudentTheatreGroupWebsite\bin\StudentTheatreGroupWebsite.dll' could not be found StudentTheatreGroupWebsite.Tests</p> <p>Any help would be much appreciated ...</p> <pre><code>using System; using System.Collections.Generic using System.Data; using System.Linq; using StudentTheatreGroupWebsite.Models; namespace StudentTheatreGroupWebsite.DAL { public class ShowRepository : IShowRepository , IDisposable { private StudentTheatreContext context; public ShowRepository(StudentTheatreContext context) { this.context = context; } public IEnumerable&lt;Show&gt; GetShows() { return context.Shows.ToList(); } public Show GetShowByID(int id) { return context.Shows.Find(id); } public void InsertShow(Show show) { context.Shows.Add(show); } public void DeleteShow(int ShowID) { Show show = context.Shows.Find(ShowID); context.Shows.Remove(Shows); } public void UpdateShow(Show show) { context.Entry(show).State = EntityState.Modified; } public void Save() { context.SaveChanges(); } private bool disposed = false; protected virtual void Dispose(bool disposing) { if (!this.disposed) { if (disposing) { context.Dispose(); } } this.disposed = true; } public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } } } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload