Note that there are some explanatory texts on larger screens.

plurals
  1. POProject Structure using MVC 4
    text
    copied!<p>As the subject says...this question is about setting up the correct structure for my project only. if you think there is a better place to ask this question then please advise.</p> <p>I have a MVC 4 project using ET &amp; repository pattern. I have DAL &amp; UI layer at this point.</p> <p>Currently i am using my DAL for data access and I created my Interfaces &amp; ViewModels within my Data Access Layer. i have a feeling i am doing it wrong. here is my Sample Set up.</p> <p><strong>MY DAL LAYER (Which contains below Interface, Repo &amp; ViewModel)</strong></p> <p><strong>DAL.ViewModel</strong></p> <pre><code>Public Class ProductSummaryViewModel Property productGUID As Integer Property productName As String End Class </code></pre> <p><strong>DAL.Interface (For Repostiory Pattern)</strong></p> <pre><code>Public Interface IProductRepository Property ProductIdentityID As Integer Property ImageMainPath As String End Interface </code></pre> <p><strong>DAL.Products Repository</strong></p> <pre><code>Public Class productsRepository Implements IProductRepository Private _db As websolutionsEntities = New websolutionsEntities() Public Function AddProduct(ByVal prdSummary As ProductSummaryViewModel) As Boolean Implements IProductRepository.AddProduct _db.AddProduct(prdSummary ) Return true End Function </code></pre> <p><strong>And here is my Controller</strong></p> <pre><code>Private ProductRepoitory As DAL.IProductRepository Sub New() Me.new(New DAL.productsRepository()) End Sub Sub New(ByVal repo As DAL.IProductRepository) repo = ProductRepoitory End Sub Public Function AddItem(ByVal prd As DAL.ProductSummaryViewModel) As ActionResult Dim test as boolean = DAL.ProductRepoitory.AddItem(prd) End Function </code></pre> <p>My project will grow in near future, so I want to set it up properly, however I don't want to make it too complicated as well for others and myself. Please advise with your suggestions.</p>
 

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