JonPSmith / SampleMvcWebApp

A Sample MVC5 web application showing the use of GenericServices for CRUD operations
MIT License
74 stars 121 forks source link

Missing version 1.0.0 GenericLibsBase from Nuget #2

Closed AllanMorris closed 9 years ago

AllanMorris commented 9 years ago

Hi Jon,

I just downloaded the sample and attempted a build and Nuget was unable to find 1.0.0 version of GenericLibsBase from VS2013 Premium edition. I noticed there was a change a day or so ago maybe this caused it somehow?

Thanks Allan

JonPSmith commented 9 years ago

Hi @AllanMorris,

Ok, at the moment as there is no released NuGet packages you have to manually install the packages. That is a bit complicated until I release proper NuGet packages for GenericServices, which should be within the next month when I have finished the next stage of the documentation and samples.

If you want to play with SampleMvcWebApp now I think there are two ways to do this:

Get GenericServices and build the Nuget packages

This one I know will work as this is how I develop, but its a lot of work.

  1. Clone GenericServices and build GenericLibsBase.
  2. Then create the NuGet packages for GenericLibsBase. Steps for this are in the GenericLibsBase.nuspec file.
  3. Place this a local directory on your machine. Also make sure when using NuGet that it considers that local source (should do as default).
  4. Add that directory as an available package source in NuGet via Tools->Options->NuGet Package Manager->Package Sources
  5. Now build GenericServices
  6. Then create the NuGet packages for GenericServices. Steps for this are in the GenericServices.nuspec file
  7. Copy that to the local directory on your machine.

After that you will be able to build SampleMvcWebApp.

Quick, dirty way.

I haven't tried this but it should work.

  1. Get the .dll files from Release V1.0.0 of GenericServices.
  2. Remove the Nuget Packages GenericServices and GenericLibsBase from each assembly in SampleMvcWebApp (That is the bit I'm not sure will work).
  3. Manually add the GenericServices and GenericLibsBase to each assembly in SampleMvcWebApp.
  4. You should make sure that AutoMapper and DelegateDecompiler.EntityFramework are also loaded.

Or, wait for NuGet release

If that is too much then do a watch on GenericServices and when I release the package on NuGet you can pick it up.

JonPSmith commented 9 years ago

Hi @AllanMorris,

Just realised that SampleMvcWebApp is at GenericService 1.0.0 so the first method would not have worked. I have committed a change to SampleMvcWebApp with it using GenericService 1.0.1. You will need to update your local copy if you want to try approach 1.

AllanMorris commented 9 years ago

Hi Jon, Many thanks for the quick feedback I will try your suggestions. Allan

AllanMorris commented 9 years ago

Hi Jon,

I have now picked up the sample of your complex sample which is an excellent view of the features available...One question I have is how do you normally create the Crud DTO's manually and via an automated process?

JonPSmith commented 9 years ago

Hi @AllanMorris,

Firstly, I had a big push and got a NuGet release of GenericServices out. Please see this issue which describes all the changes to GenericServices, including the new example web site you picked up.

Secondly, on creating a DTO I do it manually. The steps are:

  1. Create the class and add the EfGenericDto inherit.
  2. I then get prompted by resharper to implement the SupportedFunctions property.
  3. I normally I copy the properties from the database class I am targeting and dump them in as a starting point and then delete/add any changes
  4. If I have to override anything I type "override" which then presents me with the options of what to override, or copy something similar from an old project.

I hope that helps.