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

BusinessBase Exposes a Save Method in .NET Core Projects #710

Closed
rabidkitten opened this issue Apr 1, 2017 · 5 comments
Closed

BusinessBase Exposes a Save Method in .NET Core Projects #710

rabidkitten opened this issue Apr 1, 2017 · 5 comments
Assignees
Labels
Milestone

Comments

@rabidkitten
Copy link

@rabidkitten rabidkitten commented Apr 1, 2017

Updated by @rockfordlhotka

As noted later in this thread, the issue is that BusinessBase exposes a sync Save method and BusinessListBase does not. Either .NET Core should or should not support sync methods like this, but in any case it needs to support async methods.

Original text from @rabidkitten:

Using CSLA-Core 4.6.500 (the latest at the time of this writing).

Classes that inherit BusinessListBase do not expose a .Save method when used in a .NET Core assembly. I am getting around this by using .SaveAsync(). Objects that implement BusinessBase have the Save method. In a non-.NET Core assembly, the Save method is visible.

@rabidkitten
Copy link
Author

@rabidkitten rabidkitten commented Apr 3, 2017

No longer using the CSLA.

@rabidkitten rabidkitten closed this Apr 3, 2017
@rockfordlhotka
Copy link
Member

@rockfordlhotka rockfordlhotka commented Apr 3, 2017

I'm reopening this issue, as it might be a bug - there should be symmetry between the two base classes and their Save method options.

@rockfordlhotka rockfordlhotka reopened this Apr 3, 2017
@rob-v
Copy link
Contributor

@rob-v rob-v commented Apr 3, 2017

The BusinessListBase.Save method has this conditional compilation: #if !(ANDROID || IOS) && !NETFX_CORE I assume it can be removed to support Save for .NET Core projects.

I didn't finish my test, because I assume to load/reference CSLA for .NET Core projects I need VS 2017.

@rockfordlhotka
Copy link
Member

@rockfordlhotka rockfordlhotka commented Apr 3, 2017

This is a bug - the history is that UWP doesn't support synchronous IO operations, and it was the first ".NET Core" platform - so when I added support for UWP I had to remove the sync Save operations.

I actually think the bug here is that I didn't block out the sync method on BusinessListBase, not that it is missing from BusinessBase.

It remains to be seen whether I'll choose to support any sync data portal behaviors in .NET Core, given that the world is clearly moving to async overall.

To your VS2017 question @rob-v - the current master branch has been updated to 2017. But I am told that you can work with .NET Core projects using vscode as well, so 2017 probably isn't a strict requirement.

@rockfordlhotka rockfordlhotka changed the title BusinessListBase Does Not Expose Save Method in .NET Core Projects BusinessBase Exposes a Save Method in .NET Core Projects Aug 9, 2017
@rockfordlhotka rockfordlhotka self-assigned this Sep 8, 2017
@rockfordlhotka rockfordlhotka added this to the 4.7.100 milestone Sep 8, 2017
@rockfordlhotka
Copy link
Member

@rockfordlhotka rockfordlhotka commented Oct 9, 2017

I am going to close this, as the problem no longer exists in NS 2.0 - the codebase for NS 2.0 and other platforms is much more normalized than it could be in NS 1.x.

If someone is truly stuck on NS 1.x they can use the workaround noted above.

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

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.