public int UpdateProJect(ProjectViewModel model)
        {
            Email_Setting ProjectUpdate = _db.Email_Setting.Where(x => x.Id == model.Id).FirstOrDefault();

            _db.SaveChanges();
            return(ProjectUpdate.Id);
        }
        public int UpdateEmailSetting(EmailSettingViewModel model)
        {
            Email_Setting Emailsetting = _db.Email_Setting.Where(x => x.Id == model.Id).FirstOrDefault();

            Emailsetting.From_Name      = model.FromName;
            Emailsetting.From_Email     = model.FromEmail;
            Emailsetting.User_Name      = model.UserName;
            Emailsetting.Email_Password = model.EmailPassword;
            Emailsetting.Server         = model.Server;
            Emailsetting.Port           = model.Port;
            Emailsetting.Enable_SSL     = model.EnableSSL;
            _db.SaveChanges();
            return(Emailsetting.Id);
        }
        public int InsertEmailSetting(EmailSettingViewModel model)
        {
            Email_Setting Emailsetting = new Email_Setting();

            Emailsetting.From_Name      = model.FromName;
            Emailsetting.From_Email     = model.FromEmail;
            Emailsetting.User_Name      = model.UserName;
            Emailsetting.Email_Password = model.EmailPassword;
            Emailsetting.Server         = model.Server;
            Emailsetting.Port           = model.Port;
            Emailsetting.Enable_SSL     = model.EnableSSL;
            _db.Email_Setting.Add(Emailsetting);
            _db.SaveChanges();
            return(Emailsetting.Id);
        }