1

ERD Diagram

I have this schema, now i want

  1. In Create View of Artist, I want to use CreatePicture Partial View for uploading picture and saving data in database. And similar for Album controller and all other controller which will use pictureID as foreign key.

    On Save button of Create Artist, there should perform three actions simultaneously,

    • Insert Picture record in database.
    • Save picture's physical file on server.
    • Save Artist record in database with newly created pictureID.
1
  • Currently all that your question contains is the I want word. I cannot see I have tried the following code and it didn't work, .... So what you have is not a real question, it's some specification that you could give to a programmer that you hire. Not something that you would post on StackOverflow. Commented Jul 9, 2011 at 8:51

1 Answer 1

3

I have an open source project that I do most of what you are attempting to do. I host it on Google code.

  • Insert Picture record in database.

Here the user selects a picture and clicks save. You could easily turn that into a partial view. see the "customize your profile picture" area http://code.google.com/p/better-task-list-1-1-progress/source/browse/trunk/Views/Account/MyAccount.cshtml

Look at the ChangePicture() ActionResult http://code.google.com/p/better-task-list-1-1-progress/source/browse/trunk/Controllers/AccountController.cs

  • Save picture's physical file on server

Look at the code in the ChangePicture() ActionResult http://code.google.com/p/better-task-list-1-1-progress/source/browse/trunk/Views/Account/MyAccount.cshtml

  • Save Artist record in database with newly created pictureID.

Look at the code in the ChangePicture() ActionResult http://code.google.com/p/better-task-list-1-1-progress/source/browse/trunk/Views/Account/MyAccount.cshtml

Hope the information above helps you out. take care.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.