public ActionResult collageDetails(CollageModel collage) { CollageBusinessModel collageDetails = new CollageBusinessModel { CollageName = collage.CollageName }; adminBusinessOperations.SetCollageName(collageDetails); return(RedirectToAction("collageDetails")); }
//public void SetRoles() //{ // try // { // Role role = new Role // { // RoleID = 1, // RoleName = "Admin", // CreateDate = DateTime.Now, // MdifiedDate = DateTime.Now // }; // db.Roles.Add(role); // db.SaveChanges(); // } // catch (Exception ex) // { // ExceptionTracker.SendErrorToText(ex); // } //} public void SetCollageName(CollageBusinessModel collage) { Collage collageDetail = new Collage { CollageName = collage.CollageName, CreateDate = DateTime.Now, MdifiedDate = DateTime.Now }; adminDataBaseOperation.SetCollageetails(collageDetail); }
public List <CollageBusinessModel> GetAllCollage() { List <Collage> listofCollage = new List <Collage>(); List <CollageBusinessModel> allCollages = new List <CollageBusinessModel>(); try { listofCollage = applicationLevelDataBaseOps.GetAllCollage().ToList(); foreach (Collage item in listofCollage) { CollageBusinessModel collageItem = new CollageBusinessModel { CollageID = item.CollageID, CollageName = item.CollageName }; allCollages.Add(collageItem); } } catch (Exception ex) { ExceptionTracker.SendErrorToText(ex); } return(allCollages); }