//public AlbumService(DbContext context)
        //{

        //    Db = context;

        //}

        //Create Album
        public bool CreateAlbum(Album create, HttpPostedFileBase File)
        {
            string filename  = Path.GetFileNameWithoutExtension(File.FileName);
            string extension = Path.GetExtension(File.FileName);

            filename         = filename + DateTime.Now.ToString("yymmssfff") + extension;
            create.ImagePath = "~/Content/Image/Albam/" + filename;
            filename         = Path.Combine(System.Web.HttpContext.Current.Server.MapPath("~/Content/Image/Albam/"), filename);
            File.SaveAs(filename);
            //   create.Status = "Public";

            Db.Set <Album>().Add(create);
            Db.SaveChanges();
            return(true);
        }
 public IEnumerable <Warn> GetAllWarns()
 {
     return(Db.Set <Warn>().ToList());
 }
 public IEnumerable <ClientComplain> GetAllcomplains()
 {
     return(Db.Set <ClientComplain>().ToList());
 }
Exemplo n.º 4
0
        //When Register PhotoGrapher Add
        public bool AddPhotoGrapher(PhotoGrapher pht_Add)
        {
            Db.Set <PhotoGrapher>().Add(pht_Add);
            // Add_basicProfile(pht_Add.Email);
            Db.SaveChanges();



            return(true);
        }
Exemplo n.º 5
0
 //get all Booking list
 public IEnumerable <PhotoGrapherBooking> GelALLBooking()
 {
     return(Db.Set <PhotoGrapherBooking>().ToList());
 }
Exemplo n.º 6
0
 public IEnumerable <Block> GetAllBlocks()
 {
     return(Db.Set <Block>().ToList());
 }
        //DbContext Db;

        //public JobPostService(DbContext context)
        //{

        //    Db = context;

        //}


        #region//Client Job Post Service

        //Get All Job Post
        public IEnumerable <ClientJobsPost> GetAll_Jobs_Post()
        {
            //  var join = Db.ClientJobsPosts.Include(a => a.);

            return(Db.Set <ClientJobsPost>().Include("Clients").ToList());     //Join Use by navigation property
        }
        //DbContext Db;

        //public PhotoGrapherSocialService(DbContext context)
        //{

        //    Db = context;

        //}

        #region //Follwers Region

        public IEnumerable <PhotoGrapherFollower> GetAllFollowers(int id)
        {
            return(Db.Set <PhotoGrapherFollower>().Where(x => x.Fk_PhotoGrapher_ID == id).ToList());
        }
Exemplo n.º 9
0
        //DbContext Db;

        //public PhotoGallaryService(DbContext context)
        //{
        //    Db = context;
        //}


        //Get All Gallary Photo By PhotoGrapher ID
        public IEnumerable <PhotoUploadGallary> Get_All_Gallary_Photo(int id)
        {
            return(Db.Set <PhotoUploadGallary>().Where(x => x.Fk_PhotoGrapher_ID == id).ToList());
        }
Exemplo n.º 10
0
        //DbContext Db;

        //public ContactService(DbContext context)
        //{

        //    Db = context;

        //}

        #region //Client Contract PhotoGrapher

        //Admin All The Contact List
        public IEnumerable <ClientContact> AllGetContact()
        {
            return(Db.Set <ClientContact>().ToList());
        }
Exemplo n.º 11
0
 public IEnumerable <JobApplied> Getallapplys()
 {
     return(Db.Set <JobApplied>().ToList());
 }