hello please help me understand this, and lets hope it help others too.
in MVC what I Understood is a Model–view–controller which should be a pattern if am right. and in my mind its like:
Class in the Model
Function in the Controller
Layout or output in the view

but what I couldn't figure out is how to make them communicate or knowing "best practice" so I came up with this simple idea to make me understand. I have a simple video "MP4 for reference" on (C:\Users\Me\Documents\FunVid.mp4)
and I have created an ASP.NET MVC project including: - A Model. "VideoProdcast.cs" - A Controller. "VideoController.cs" - View "Razor". "VideoView.cshtml"
so if this is the :
Model : "VideoProdcast.cs"
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Vidi.Models
{
public class VideoProdcast
{
public int MovieId { get; set; }
public string MovieName { get; set; }
}
}
Controller:"VideoController.cs"
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Vidi.Models;
namespace Vidi.Controllers
{
public class VideoController : Controller
{
// GET: Video
public ActionResult VideoView()
{
var Movie = new Movie() { Name = "Movie" };
return View(Movie);
}
}
}
View: "VideoView.cshtml"
@{
ViewBag.Title = "VideoView";
}
<h2>VideoView</h2>
So given the fact that my movie is on (C:\Users\Me\Documents\FunVid.mp4) what is the best practise to show this movie on my view, using(MVC Structure) the view to call funVid.mp4 as a controller or function by movie name from the model. "and please do help me if am wrong in stating anything?" Note that video format is not a must "any supported formate will work just fine ".
I dont know if I made it easier or harder to understand but this is how am imagining it. thanks in advance I really do appreciate your help.