private void SendMail(UserName user, Book book) { MailAddress from = new MailAddress("*****@*****.**", "Library"); MailAddress to = new MailAddress(user.Email); MailMessage msg = new MailMessage(from, to); msg.Subject = "You have a new book"; msg.Body = string.Format("{0}, you are successfully taken a book called \"{1}\"", user.Name, book.Name); SmtpClient smtp = new SmtpClient(); smtp.Send(msg); }
partial void UpdateUserName(UserName instance);
partial void DeleteUserName(UserName instance);
partial void InsertUserName(UserName instance);