我对从 Ruby on Rails 3 迁移而来的 ASP.NET MVC 框架有点陌生,它是 ActiveRecord。请帮助我了解 dalAccess 在 MVC 中的位置。
[HttpGet]
public ActionResult copyCampaign(int Id)
{
DALAccess dalaccess = new DALAccess();
//string newid = dalaccess.CopyOffer(Id);
string newid = dalaccess.CopyOfferByCampaignId(Id);
string type = PrepareOffer4Edit(newid);
if (type == "bundle")
return RedirectToAction("bundleStep1");
else if (type == "scratchOff")
return RedirectToAction("scratchOffStep1");
else
{
return RedirectToAction("CampaignMgmt", "CampaignMgmt");
}
}