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

Fixes and improvements #44

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open

Fixes and improvements #44

wants to merge 17 commits into from

Conversation

GioviQ
Copy link

@GioviQ GioviQ commented Sep 9, 2020

No description provided.

@marcelgood
Copy link
Contributor

marcelgood commented Sep 9, 2020

Thanks for the PR. We'll have to go through these changes in detail. I see no comments in the code as to what each change is supposed to address, so the confidence level is very low at the moment. I just commented on three of your changes, because I don't know why you would change that. If you could add code comments and explain what each of your changes is about, then we can consider merging them. It seems this has deviated from originally being about concurrency.

@@ -94,12 +94,10 @@ public class DataService : IJsonSerializable {
httpClient = DefaultHttpMessageHandler == null ? new HttpClient() : new HttpClient(DefaultHttpMessageHandler);
}
_httpClient = httpClient;
_httpClient.BaseAddress = new Uri(ServiceName);
Copy link
Author

@GioviQ GioviQ Sep 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// need to insure that fk props match
var fkProps = np.ForeignKeyProperties;
npEntity.EntityAspect.EntityType = np.EntityType;
// Set this Entity's fk to match np EntityKey
// Order.CustomerID = aCustomer.CustomerID
npEntity.EntityAspect.EntityKey.Values.ForEach((v, i) => SetDpValue(fkProps[i], v));
//commented because set keys to default values
Copy link
Author

@GioviQ GioviQ Sep 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In https://github.com/enkodellc/blazorboilerplate/blob/development/src/Shared/BlazorBoilerplate.Shared/Dto/Db/UserProfile.cs

ApplicationUser has wrong key as empty Guid

Probably you have a better solution. You can use that repo as test.

@@ -120,7 +120,7 @@ public class JsonQueryExpressionVisitor : ExpressionVisitor {
return this.Visit(m.Arguments[0]);
}
} else if (methodName == "OrderByDescending") {
if (this.ParseOrderByExpression(m, "DESC")) {
if (this.ParseOrderByExpression(m, "desc")) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DESC is not accepted by Breeze Server

if (string.IsNullOrEmpty(OrderBy)) {
OrderBy = string.Format("{0}{1}", body.Member.Name, order);
} else {
OrderBy = string.Format("{0}, {1}{2}", OrderBy, body.Member.Name, order);
Copy link
Author

@GioviQ GioviQ Sep 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong implementation of OrderBy.
Yesterday I discovered that Parameters implementation is even missing, so I am trying to provide one.

@@ -85,6 +85,13 @@ public class NamingConvention : Internable {
return clone;
}

public NamingConvention WithServerClientNamespaceMapping(IDictionary<String, String> serverClientNamespaceMap) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GioviQ
Copy link
Author

GioviQ commented Sep 10, 2020

See other notes in #33

@@ -0,0 +1,69 @@
using System;
Copy link
Author

@GioviQ GioviQ Sep 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From an old PR of another user (https://github.com/dwarry)

@@ -40,6 +40,8 @@ public class MetadataStore : IJsonSerializable {

public static String MetadataVersion = "1.0.3";

private Regex regExGeneric = new Regex(@"`\d+");
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Entitities from Asp.Net Identity contain generics and in metadata I have in class name `1 for example.

Do you know how to resolve in another way?

//without a server-side custom model binder for 'Customer?{"parameters":{"companyName":"C"}}' I cannot have parameters with right values,
//so I have to use this hack
if (visitor.Parameters?.Count > 0)
json = json + "&" + string.Join("&", visitor.Parameters.Select(kvp => string.Format("{0}={1}", kvp.Key, kvp.Value)));
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot make it working without this hack. I need some hints from authors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants