how i can implement this all in a C# code

bobkhan khan 1 Reputation point
2020-09-24T13:56:07.85+00:00

in C# to implement
for a Online Account--------
A class is to be modeled for the accounts of a web shop. As contact information should
Name, first name, gender and date of birth of the customer, as well as zip code, city and street
get saved. In addition, a landline and mobile phone number as well as an e-mail address are saved; the e-mail address also serves as the user name. For the login process
a password must be created.
The following processes must be taken into account:
1- Checking the formal validity of the email address.
2- Changing the contact information.
3- Changing the password (only possible if the current password is known).
4-Changing the password if the old password has been forgotten (via sending
an email with a special change link).

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
38,604 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Leon Laude 85,776 Reputation points
    2020-09-25T06:30:20.443+00:00

    Hi @bobkhan khan ,

    I suggest you ask the subject matter experts in the dedicated C# forum over here:
    https://social.msdn.microsoft.com/Forums/en-US/home?forum=csharpgeneral

    ----------

    (If the reply was helpful please don't forget to upvote or accept as answer, thank you)

    Best regards,
    Leon

    0 comments No comments

  2. Karen Payne MVP 35,401 Reputation points
    2020-10-30T22:03:24.143+00:00

    Hello @bobkhan khan ,

    Rather than thinking in terms of "a class" first model what is needed in a database, seed the database with realistic data followed by determining if you can get back data as you would expect. All of this should be done in a database editor e.g. SSMS (SQL-Server Management Studio) for SQL-Server, MS-Access use the tools in the database, Oracle SQL Developer or Toad etc.

    Next consider how you will interact with the data, this might be a managed data provider, Entity Framework 6 or Entity Framework Core.

    Decide on a project type (there are several types to choice from in Visual Studio dependent on the version of Visual Studio). Once this is done if using Entity Framework reverse engineer the database using EF Power Tools (free).

    In regards to

    • Validating email address, there is no one correct way, look around the web, try a few out. Note that with classes generated by Entity Framework one option is to use data annotations to validate an email but it's not perfect.
    • Changing password/resetting passwords, best to look around as there is no one all encompassing method. If this is a commercial app a consideration may be to use Azure on prem (cost less then on the web but takes time to properly setup)

    Don't get hung up on things such as working with contact details interacting in the user interface, instead if you are new to this type of development, start out small in a test project and work through the basics, moving to where you need to be with the user interface.

    My assumption is you are new to this type of development so don't rush, take you time and handle small chunks of coding at a time. Look at setting up a DevOps account and create a project, write out your requirements in stories, task and test along with using the repository to store code.

    In closing, if you get stuck with something either ask here, MSDN C# forum or StackOverflow and be clear to what you are having problems with.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.