Esempio n. 1
0
        public bool GetEmail(Guid Id)
        {
            try
            {
                using (var context = new EmailContext())
                {
                    Email email = context.Emails.Where(x => x.EmailId == Id).First();
                }

                return(true);
            }
            catch (Exception e)
            {
                throw new System.Exception("Unable to retrieve Email" + e.StackTrace);
            }
        }
Esempio n. 2
0
        public bool Save()
        {
            try
            {
                using (var context = new EmailContext())
                {
                    context.Emails.Add(this);
                    context.SaveChanges();
                }

                return(true);
            }
            catch (Exception e)
            {
                throw new System.Exception("Unable to save Email" + e.StackTrace);
            }
        }