Beispiel #1
0
        public List<DropDownItem> GetStateListRepo(string defaultvalue)
        {
            var ddlList = new List<DropDownItem>();

            using (var context = new BlogEntities())
            {
                var list = context.Categories.ToList();

                ddlList.AddRange(list.Select(item => new DropDownItem() { Id = item.CategoryID, Name = item.CategoryName }));
            }
            return ddlList;
        }
Beispiel #2
0
        public List<DropDown> GetStateList(string defaultvalue)
        {
            var mappedResult = new List<DropDown>();

            using (var context = new BlogEntities())
            {
                var list = GetStateListRepo(defaultvalue);
                Mapper.CreateMap<DropDownItem, DropDown>();
                mappedResult = Mapper.Map<List<DropDown>>(list);
            }
            return mappedResult;
        }
Beispiel #3
0
 public ActionResult Edit(string id)
 {
     using (BlogEntities _db = new BlogEntities())
     {
         //Customer
     }
     return View();
 }
Beispiel #4
0
        public ActionResult Details(string id)
        {
            Customer objCusomer = new Customer();
            using (BlogEntities _db = new BlogEntities())
            {
                objCusomer = _userService.FindBy(id);
                if (objCusomer != null)
                {

                }
            }
            return View();
        }
Beispiel #5
0
 public ActionResult Delete(string id)
 {
     using (BlogEntities _db = new BlogEntities())
     {
         //implement here
     }
     return View();
 }