Skip to content

Attribute on and type #17909

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

Closed
CoolCoderSuper opened this issue Oct 22, 2024 · 2 comments
Closed

Attribute on and type #17909

CoolCoderSuper opened this issue Oct 22, 2024 · 2 comments

Comments

@CoolCoderSuper
Copy link

CoolCoderSuper commented Oct 22, 2024

Is your feature request related to a problem? Please describe.

You cannot currently place an attribute when you define a recursive type thing with and definitions.

[<Table("Note")>]
type Note() =
    [<Key>]
    member val UniqueID = "" with get,set
    member val DeviceName = "" with get,set
    member val Date = DateTime.MinValue with get,set
    member val Note = "" with get,set
    member val Technician = "" with get,set
    member val Device: Device | null = null with get,set

[<Table("Device")>]//this is an error
and Device() =
    [<Key>]
    member val UniqueID = "" with get,set
    member val Type = "" with get,set
    member val Computer = "" with get,set
    member val Customer = "" with get,set
    member val Archived = false with get,set
    member val SnoozeDate: Nullable<DateTime> = Nullable() with get,set
    member val Notes: ObservableCollection<Note> = null with get,set

Describe the solution you'd like

Apply the attribute

Describe alternatives you've considered

Not sure

I apologize if this is not the right spot the request this.

@dawedawe
Copy link
Contributor

place the attribute between the and and the type ident

and [<Table("Device")>] Device() =

@CoolCoderSuper
Copy link
Author

Ah, thank you so much

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

No branches or pull requests

2 participants