2
Answers

Web API and MVC Project Using [HttpPost] To Delete

Luke Rayner

Luke Rayner

9y
405
1
Hi,
I have been making a project which involves a Web API and MVC, I have been able to connect my MVC project to my API allowing me to display data onto one of my views using a table.
I am struggling to create a delete function on my MVC project, I have made it pull a set of data from the table to a different view using the ID (i have created the view using the template you are given)
The code below is what i did in order to get that data
[HttpGet]
public ActionResult Delete(int id)
{
StudentModel Student = new StudentModel();
HttpClient client = new HttpClient();
client.BaseAddress = new Uri("http://localhost:6193/");

client.DefaultRequestHeaders.Accept.Add(
new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json"));
HttpResponseMessage response = client.GetAsync("api/students/" + id).Result;
if (response.IsSuccessStatusCode)
{
Student = response.Content.ReadAsAsync<StudentModel>().Result;

}
return View(Student);
}
Now i am trying to use the [HttpPost] to remove the data from my database i would be really grateful if anyone is able to help me out and keep it pretty simple so i am able to understand it.
Answers (2)
1
Jim Stroke

Jim Stroke

NA 492 2 11y
You can find various solutions on having a google search for your problem.
Or you can have a look at the following link: Apple mail to Pst Windows


Hope this will help.
Thank you
Accepted
0
Andew Condon

Andew Condon

NA 4 1 8y
Try Mail Extractor Pro, if you are looking for Apple Mail / MBOX to PST Converter for Mac Version.
Get More Info:http://www.mailextractorpro.com
0
Stephen Ronald

Stephen Ronald

NA 12 0 9y

You need to copy Apple Mail MBOX file to Windows machine and convert it to PST format. For that you can use a smart Apple mail to Outlook converter for Windows. The tool extract all email messages from MBOX file and save them to an importable PST format.

Download from: http://www.mboxtooutlook.org/convert/applemail.html 

0
David Brenner

David Brenner

NA 5 1.7k 10y
I just tried the new mac version of the same tool Apple Mail to pst Converter

M
uch faster than the windows version and auto-detects the apple mail email files. Being a user the only thing I needed to do was transfer the converted pst file and import it into windows outlook.
0
William Wall

William Wall

NA 3 1.5k 11y
Thanks for the solution.
0
Tony Gump

Tony Gump

NA 922 5 11y
A quick and easy way to do this is with a GMail IMAP account. Just setup the GMail account on the Mac and in Outlook on Windows. Then in Mail (Mac) drag the messages from your account to the GMail IMAP folders (make as many as you need). Now in Outlook drag the messages from the GMail IMAP account into the Outlook folders you want.

Another way is to go fro third party applications. 
The one I know is : Apple Mail to PST Convert – Convert Apple Mail Emails to WIndows Outlook PST

Using third party applications has the advantage of doing the migration quickly while the imap account method is slow and lengthy.

Choose the way you want to opt.
Thank you