Base solution for your next web application

Activities of "chrisk"

Hi

Are you getting exception in regards of IRepository being disposed or is it coming from somewhere lover down the stack, like DbContext disposed exception?

I had issues before where my DbContext would be disposed but the reason for that was misusing the framework and not understanding UnitOfWork. Make sure when your code operates on DB that UnitOfWork is applied. [http://www.aspnetboilerplate.com/Pages/Documents/Unit-Of-Work])

Hope that helps

Hi,

I believe that IRepository.Get() method is meant to return exception if record was not found. You can use .FirstOrDefault() to do that. For example UserManager class has GetById and FindById methods where later works as you want.

Hi,

Thank you very much for response it means a lot to me especially because when I started working with Abp my developing skills improved same as quality of my work and timings - it was most complex and at the same time very well structured - simply best working project I worked with so far. For me as for junior developer Abp is an example of top quality software which I want to follow and your github repo serves for me as a holly book- I love the patterns and techniques used :)

Hi,

I'm using IEmailSender with success which in turn by default uses SmtpEmailSender. In my case added email functionality to existing notification infrastructure.

Check this [https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp/Net/Mail/EmailSettingProvider.cs]) and [https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp/Net/Mail/Smtp/SmtpEmailSender.cs])

All I had to do to get emails to work was to override some of default settings.

_settingManager.ChangeSettingForApplication(EmailSettingNames.Smtp.Host, "");
            _settingManager.ChangeSettingForApplication(EmailSettingNames.Smtp.UserName, "");
            _settingManager.ChangeSettingForApplication(EmailSettingNames.Smtp.Password, "");
            _settingManager.ChangeSettingForApplication(EmailSettingNames.DefaultFromAddress, "");
            _settingManager.ChangeSettingForApplication(EmailSettingNames.DefaultFromDisplayName, "");

To create email content either in IApplicationService or anywhere else I created :

public interface IEmailParser
    {
        MailMessage Parse(TenantNotification notification);
    }

And lastly I implemented IEmailParser in my Web project using Postal

https://github.com/andrewdavey/postal

Hope that helps

Hi,

I believe that you'll need to to use INotificationDistributer to distribute notifications and then assert your test. Check this [https://github.com/aspnetboilerplate/aspnetboilerplate/blob/11f2a25119c0447b0581172cd6aa9c3ee67d916f/src/Abp/Notifications/NotificationDistributer.cs]) So when you publish notification it's going to be saved as TenantNotification and then publisher saves them as UserNotifications during actual publish.

Hi,

I'd like to ask how is that achieved in Abp that without adding controllers or routes it is possible to serve .cshtml files to client like '/App/Main/views/tenants/index.cshtml' Or in fact it does something similar to dynamic web api controller builder ?

I'm really curious and it would be handy to know how to apply it to projects that can not use Abp.

Hi @ismcagdas

It makes perfect sense now :)

Thank you for that.

Showing 11 to 17 of 17 entries