Base solution for your next web application
Open Closed

I want to scale an application #1276


User avatar
0
okeziestanley created

Hi Halil, I am working on large project and I need your advice on the following things.

  1. I need to add new Class library projects to the existing solution, but I want it to have all the features of abp and also be able to use them at the Application layer and Web Layer
  2. I also want to add new web projects (which will be hosted on sub domains) but I want them to have all the features on abp and can use the same core library.
  3. Lastly I want to save some images on the database and declare them as byte[] on the entity class. How can I map this with a DTO on the application layer. I appreciate your effort. Keep on with the good work.

1 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    Hi,

    For 1 & 2, you can do it easily. You can take the startup template as an example. A library shoul define a module file to be able to get benefits of ABP infrastructure (<a class="postlink" href="http://www.aspnetboilerplate.com/Pages/Documents/Module-System">http://www.aspnetboilerplate.com/Pages/ ... ule-System</a>). Then you should depend on that new library module from your web module. For 3; You can map byte[] to byte[] but I'm not sure this is what you want. For that, I generally do not store bytes in entities. Because this makes entities very large and most of time we will not use the image. So, create a nother table for storing images and just store Id of the image in your main entity. You can create a controller action that returns a file result that gets Id of an image and returns it's bytes to the client. Thus, you can get images from server whenever you need. I suggest to making Id of images as GUID, for security.