WebServices Core3.1 C# - Return List Of number
Budget: €8 – €30 EUR
Implement web services MVC Core 3.1 C#
The need is to implement a web services that returns a list of numbers retrieved from a range on the sql table
web services must have a method with 3 parameters
- totNum (int)=how many numbers must have return list
- user (string)= user calling web services (a string)
- idProcessing (string) =is an alphanumeric string that identifies for which job numbers are being requested
the method retrieves numbers from a range in an sql table
and writes in another table the numbers used, the user, date of execution, and IdProcessing
1 Table SQL: RangeNumbers
NumStart =1
NumEnd =9000
2 Table SQL: ProcessesDone
Start
end
User
DateExecute,
IDProcessing
Important:
if there are more calls at the same time
the method must manage competition
CANNOT use the same numbers for different processes
the second user could return the message: “try again later”
Example
1 call: 100, “Maicol”, “001228A”
the table ProcessesDone is populated with
1, 100, Maicol, 2021-12-27 15:03:42.510 , 001228A”
2 call: 800, “George”, “001228B”
the table ProcessesDone is populated with
101, 900, George, 2021-12-27 15:05:16.793 , 001228B”
if there are no more numbers available, it returns a message
there are not enough numbers
use c# core 3.1 and Entity Framework
The need is to implement a web services that returns a list of numbers retrieved from a range on the sql table
web services must have a method with 3 parameters
- totNum (int)=how many numbers must have return list
- user (string)= user calling web services (a string)
- idProcessing (string) =is an alphanumeric string that identifies for which job numbers are being requested
the method retrieves numbers from a range in an sql table
and writes in another table the numbers used, the user, date of execution, and IdProcessing
1 Table SQL: RangeNumbers
NumStart =1
NumEnd =9000
2 Table SQL: ProcessesDone
Start
end
User
DateExecute,
IDProcessing
Important:
if there are more calls at the same time
the method must manage competition
CANNOT use the same numbers for different processes
the second user could return the message: “try again later”
Example
1 call: 100, “Maicol”, “001228A”
the table ProcessesDone is populated with
1, 100, Maicol, 2021-12-27 15:03:42.510 , 001228A”
2 call: 800, “George”, “001228B”
the table ProcessesDone is populated with
101, 900, George, 2021-12-27 15:05:16.793 , 001228B”
if there are no more numbers available, it returns a message
there are not enough numbers
use c# core 3.1 and Entity Framework