Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Property set method not found #1057

Closed
tjackadams opened this issue May 26, 2016 · 4 comments
Closed

Property set method not found #1057

tjackadams opened this issue May 26, 2016 · 4 comments
Assignees
Labels
Milestone

Comments

@tjackadams
Copy link
Contributor

Hello,

i have just upgraded to v0.9.1.1 and i seem to be running into an issue with some of my database queries now.

Here is an example query, this is in the app service layer

List<SelectListItem> partialList = _veeamCloudRepositoryRepository.GetAll() .Where(x => x.FriendlyName.ToLower().Contains(accountNameFilter)) .Where(x => !x.IsAssigned) .Join( _splaVeeamCloudTenantRepository.GetAll(), r => r.TenantId, ct => ct.SplaVeeamCloudTenantId, (r, ct) => new { r, ct }) .AsEnumerable() .Select(x => new SelectListItem { Text = x.ct.Name, Value = x.r.Id.ToString() }) .OrderBy(x => x.Text) .ToList();

Here is the exception i am getting

System.ArgumentException occurred
HResult=-2147024809
Message=Property set method not found.
Source=mscorlib
StackTrace:
at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, Object[] index)
at Abp.EntityFramework.Utils.DateTimePropertyInfoHelper.<>c__DisplayClass3_0.b__0(PropertyInfo property) in D:\Halil\GitHub\aspnetboilerplate\src\Abp.EntityFramework\EntityFramework\Utils\DateTimePropertyInfoHelper.cs:line 44
at System.Collections.Generic.List1.ForEach(Action1 action)
at Abp.EntityFramework.Utils.DateTimePropertyInfoHelper.NormalizeDatePropertyKinds(Object entity, Type entityType) in D:\Halil\GitHub\aspnetboilerplate\src\Abp.EntityFramework\EntityFramework\Utils\DateTimePropertyInfoHelper.cs:line 37
at Abp.EntityFramework.Uow.EfUnitOfWork.ObjectContext_ObjectMaterialized(DbContext dbContext, ObjectMaterializedEventArgs e) in D:\Halil\GitHub\aspnetboilerplate\src\Abp.EntityFramework\EntityFramework\Uow\EfUnitOfWork.cs:line 213
at Abp.EntityFramework.Uow.EfUnitOfWork.<>c__DisplayClass19_01.<GetOrCreateDbContext>b__0(Object sender, ObjectMaterializedEventArgs args) in D:\Halil\GitHub\aspnetboilerplate\src\Abp.EntityFramework\EntityFramework\Uow\EfUnitOfWork.cs:line 151 at System.Data.Entity.Core.Objects.ObjectContext.OnObjectMaterialized(Object entity) at System.Data.Entity.Core.Common.Internal.Materialization.Shaper.RaiseMaterializedEvents() at System.Data.Entity.Core.Common.Internal.Materialization.Shaper1.StopMaterializingElement()
at System.Data.Entity.Core.Common.Internal.Materialization.Shaper1.SimpleEnumerator.MoveNext() at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext()
at System.Linq.Buffer1..ctor(IEnumerable1 source)
at System.Linq.OrderedEnumerable1.<GetEnumerator>d__1.MoveNext() at System.Collections.Generic.List1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)
at Portal.Storage.StorageAppService.d__41.MoveNext() in C:\Users\admin.tom.adams.CTL-PORTAL\Documents\Visual Studio 2015\Projects\Portal\Portal.Application\Storage\StorageAppService.cs:line 1542
InnerException:

Any suggestions as to what is causing this? Thanks

@hikalkan
Copy link
Member

Do you have "get only" DateTime properties in your entities?

@tjackadams
Copy link
Contributor Author

Yes, infact the setter was removed from the DateTime property.
This is resolved now. Many Thanks.

@hikalkan hikalkan reopened this May 27, 2016
@hikalkan
Copy link
Member

While it solves your issue, we should check setter and fix it in the framework. Actually, we should directly set backend field without using Setter method.

@hikalkan hikalkan added this to the ABP v0.9.2 milestone May 27, 2016
@hikalkan
Copy link
Member

hikalkan commented Jun 3, 2016

I only checked for 'CanWrite' for the property. Currently, it seems working properly.

@hikalkan hikalkan added bug and removed problem labels Jun 3, 2016
KenProDev pushed a commit to KenProDev/aspnetboilerplate that referenced this issue Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants