예제 #1
0
        public List <ViewFinancialYear> GetAll()
        {
            //fetch db.animal data, and pull all rows table into RAM
            var financialYears = db.FinancialYears.ToList();
            //convert this data into view data
            var viewFinancialYears = new List <ViewFinancialYear>();

            foreach (var li in financialYears)
            {
                var viewFinancialYear = new ViewFinancialYear(li);
                viewFinancialYears.Add(viewFinancialYear);
            }
            //return
            return(viewFinancialYears);
        }
        // GET: FinancialYear/Details/5
        public ActionResult Details(int id)
        {
            ViewFinancialYear viewFinancialYear = dal.Get(id);

            return(View(viewFinancialYear));
        }