I am working on C# project and i am using Linq to Sql as Database i have a window form for holding a sale Invoice Detail like ac | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

I am working on C# project and i am using Linq to Sql as Database i have a window form for holding a sale Invoice Detail like ac

I am working on C# project and i am using Linq to Sql as Database i have a window form for holding a sale Invoice Detail like account detail ,invoice value etc and for calculation i have created a class which containing some function to done some spacial task on the invoice and some Database function is already defined in another class which is generated by OR designer in LINQ My question is "is this a right way to using three classes to do one work" can i make my class as a child class of that class which is generated by OR designer in LINQ, or can i make my class as a child class of windows form class ? please gide me the right way

8th Jul 2019, 2:02 AM
Amit Kumar Gupta
Amit Kumar Gupta - avatar
2 Answers
+ 1
Your question is a bit hard to understand, but i think you're using classes the right way.
28th Jul 2019, 12:21 AM
haydenki
haydenki - avatar
+ 1
do you have any code samples you can share? sounds like you have: * a class for input, clsForm. * a class for data access, maybe using entity framework, dtacMyDb * a class for calculation based on user input AND database results, which might be called business logic So chances are this is used right but I can also envision this being done a wrong way so some code (deidentified, if necessary) would really help here
24th Aug 2019, 7:51 AM
SQrL
SQrL - avatar