public MenuMasterModel AddNewMenu(MenuMasterModel model)
        {
            //ResponseStatus respponse = new ResponseStatus();
            MenuMasterModel data = new MenuMasterModel();

            using (sjb_androidEntities context = new sjb_androidEntities())
            {
                var me = context.menumasters.Find(model.MenuId);
                if (me != null)
                {
                    me.MenuName  = model.MenuName;
                    me.MenuPrice = model.MenuPrice;
                    me.StoreId   = model.StoreId;
                    var result = context.SaveChanges();
                    if (result > 0)
                    {
                        data.MenuId = me.MenuId;
                    }
                }
                else
                {
                    menumaster m = new menumaster();
                    m.MenuName  = model.MenuName;
                    m.MenuPrice = model.MenuPrice;
                    m.StoreId   = model.StoreId;
                    context.menumasters.Add(m);
                    var result = context.SaveChanges();
                    if (result > 0)
                    {
                        data.MenuId = m.MenuId;
                    }
                }
            }
            return(data);
        }
        public MenuMasterModel GetMenuById(int id)
        {
            //ResponseStatus respponse = new ResponseStatus();
            MenuMasterModel data = new MenuMasterModel();

            using (sjb_androidEntities context = new sjb_androidEntities())
            {
                data = (from m in context.menumasters
                        join s in context.storemasters on m.StoreId equals s.StoreId into j1
                        from j2 in j1.DefaultIfEmpty()
                        orderby m.CreatedOn descending
                        where m.MenuId == id
                        select new MenuMasterModel()
                {
                    MenuId = m.MenuId,
                    MenuName = m.MenuName,
                    MenuPrice = (decimal)m.MenuPrice,
                    StoreName = j2.StoreName
                }).FirstOrDefault();
            }
            return(data);
        }